Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidMsg = errors.New("invalid message") ErrNotReady = errors.New("not ready") ErrPeerNotFound = errors.New("peer message not found") ErrNotEnoughBKs = errors.New("not enough Birkhoff coefficient") ErrSelfBKNotFound = errors.New("self Birkhoff coefficient not found") ErrInvalidBK = errors.New("invalid Birkhoff coefficient") ErrInconsistentThreshold = errors.New("inconsistent threshold") ErrInconsistentPeerNumAndBks = errors.New("inconsistent peer num and bks") ErrInconsistentPubKey = errors.New("inconsistent public key") )
Functions ¶
func GetTestPeers ¶ added in v1.0.2
func GetTestPeersByArray ¶ added in v1.0.2
Types ¶
type StopPeerManager ¶ added in v1.0.3
type StopPeerManager[Type ~int32] struct { types.PeerManager // contains filtered or unexported fields }
func NewStopPeerManager ¶ added in v1.0.3
func NewStopPeerManager[Type ~int32](stopMessageType Type, p types.PeerManager) *StopPeerManager[Type]
func (*StopPeerManager[Type]) MustSend ¶ added in v1.0.3
func (p *StopPeerManager[Type]) MustSend(id string, message interface{})
type TestPeerManager ¶ added in v1.0.2
type TestPeerManager struct {
// contains filtered or unexported fields
}
func NewTestPeerManager ¶ added in v1.0.2
func NewTestPeerManager(id int, lens int) *TestPeerManager
func NewTestPeerManagerWithPeers ¶ added in v1.0.2
func NewTestPeerManagerWithPeers(id int, peers []string) *TestPeerManager
func (*TestPeerManager) MustSend ¶ added in v1.0.2
func (p *TestPeerManager) MustSend(id string, message interface{})
Only send if the msg main exists
func (*TestPeerManager) NumPeers ¶ added in v1.0.2
func (p *TestPeerManager) NumPeers() uint32
func (*TestPeerManager) PeerIDs ¶ added in v1.0.2
func (p *TestPeerManager) PeerIDs() []string
func (*TestPeerManager) SelfID ¶ added in v1.0.2
func (p *TestPeerManager) SelfID() string
func (*TestPeerManager) Set ¶ added in v1.0.2
func (p *TestPeerManager) Set(msgMains map[string]types.MessageMain)
Click to show internal directories.
Click to hide internal directories.