Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoService ¶
type CryptoService interface { ValidateAliveMsg(message *protos.SignedRKSyncMessage) bool SignMessage(m *protos.RKSyncMessage) *protos.Envelope SelfIdentity() common.PeerIdentityType }
CryptoService is an interface that discovery expects to be implemented and passed on creation
type Discovery ¶
type Discovery interface { // GetMembership returns the alive members in the view GetMembership() []common.NetworkMember // InitiateSync makes the instance ask a given number of peers // for their membership information InitiateSync(peerNum int) // Connect makes this instance to connect to a remote instance Connect(member common.NetworkMember, id identifier) // Lookup returns a network member, or nil if not found Lookup(pkiID common.PKIidType) *common.NetworkMember // Stop this instance Stop() }
Discovery is the interface represents a discovery module
func NewDiscoveryService ¶
func NewDiscoveryService(self common.NetworkMember, rpc RPCService, crypt CryptoService) Discovery
NewDiscoveryService returns a new discovery service
type RPCService ¶
type RPCService interface { Gossip(msg *protos.SignedRKSyncMessage) SendToPeer(peer *common.NetworkMember, msg *protos.SignedRKSyncMessage) Ping(peer *common.NetworkMember) bool Accept() <-chan protos.ReceivedMessage PresumedDead() <-chan common.PKIidType CloseConn(peer *common.NetworkMember) Forward(msg protos.ReceivedMessage) }
RPCService is an interface that the discovery expects to be implemented and passed on creation
Click to show internal directories.
Click to hide internal directories.