Skip to content
Snippets Groups Projects
quantummodule.go 663 B
Newer Older
  • Learn to ignore specific revisions
  • package peers
    
    import (
    	"code.fbi.h-da.de/danet/quant/goKMS/kms/event"
    	"code.fbi.h-da.de/danet/quant/goKMS/kms/store"
    	"github.com/google/uuid"
    )
    
    
    const (
    	maxFailedKeyRequestAttempts = 10
    	defaultKeyFetchInterval     = 10
    	defaultKeyFetchAmount       = int64(1)
    	DefaultMaxKeyFillLevel      = uint64(100)
    )
    
    
    // QuantumModule interface definition.
    type QuantumModule interface {
    	ID() uuid.UUID
    	Initialize() error
    	SetKmsPeerInformation(kmsClient *GRPCClient, kmsEventBus *event.EventBus, kmsTcpSocketStr string) error
    	KeyStore() *store.KmsKeyStore
    	SetKeyStore(*store.KmsKeyStore)
    	Sync() error
    	Address() string
    
    	IsActive() bool