Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Adapter ¶
type Adapter interface { GetChannelConfig() Config Gossip(message *protos.SignedRKSyncMessage) Forward(message protos.ReceivedMessage) Send(message *protos.SignedRKSyncMessage, peers ...*common.NetworkMember) SendWithAck(message *protos.SignedRKSyncMessage, timeout time.Duration, minAck int, peers ...*common.NetworkMember) error GetMembership() []common.NetworkMember Lookup(pkiID common.PKIidType) *common.NetworkMember DeMultiplex(interface{}) Unregister([]byte) Accept(acceptor common.MessageAcceptor, mac []byte, passThrough bool) (<-chan *protos.RKSyncMessage, <-chan protos.ReceivedMessage) CreateLeaveChainMessage(chainMac common.ChainMac) (*protos.SignedRKSyncMessage, error) }
Adapter enables the gossipChannel to communicate with gossipService
type Channel ¶
type Channel interface { Self() *protos.ChainState // IsMemberInChan checks whether the given member is eligible to be in the channel IsMemberInChan(member common.NetworkMember) bool // HandleMessage processes a message sent by a remote peer HandleMessage(protos.ReceivedMessage) // Initialize allocates the ChainState and should be invoked once per channel per creation Initialize(string, []common.PKIidType, []*common.FileSyncInfo) (*protos.ChainState, error) // InitializeWithChanState allocates the ChainState message InitializeWithChainState(*protos.ChainState) error // AddMember adds member to the channel AddMember(common.PKIidType) (*protos.ChainState, error) // RemoveMember removes member contained in the channel RemoveMember(common.PKIidType) (*protos.ChainState, error) // AddFile adds files to the channel AddFile([]*common.FileSyncInfo) (*protos.ChainState, error) // RemoveFile removes file contained in the channel RemoveFile([]string) (*protos.ChainState, error) // Stop the channel's activity Stop() }
Channel defines an object that deals with all channel-related message
Click to show internal directories.
Click to hide internal directories.