Versions in this module Expand all Collapse all v0 v0.0.1 Aug 23, 2024 Changes in this version + const DirectSendID + func NewConnectableHost(h host.Host) *connectableHost + func NewConnectionsHandler(args ArgConnectionsHandler) (*connectionsHandler, error) + func NewDirectSender(ctx context.Context, h host.Host, signer p2p.SignerVerifier, ...) (*directSender, error) + func NewMessage(msg *pubsub.Message, marshaller p2p.Marshaller, ...) (*message.Message, error) + func NewMessagesHandler(args ArgMessagesHandler) (*messagesHandler, error) + func NewMockMessenger(args ArgsNetworkMessenger, mockNet mocknet.Mocknet) (*networkMessenger, error) + func NewNetworkMessenger(args ArgsNetworkMessenger) (*networkMessenger, error) + func NewOutgoingChannelLoadBalancer(logger p2p.Logger) (*outgoingChannelLoadBalancer, error) + func NewTestNetMessenger(args ArgsNetworkMessenger) (*testNetMessenger, error) + type ArgConnectionsHandler struct + ConnMonitor ConnectionMonitor + ConnectionsMetric ConnectionsMetric + Logger p2p.Logger + NetworkType p2p.NetworkType + P2pHost ConnectableHost + PeerDiscoverer p2p.PeerDiscoverer + PeerID core.PeerID + PeerShardResolver p2p.PeerShardResolver + PeersOnChannel PeersOnChannel + PreferredPeersHolder p2p.PreferredPeersHolderHandler + ProtocolID string + Sharder p2p.Sharder + type ArgMessagesHandler struct + ConnMonitor ConnectionMonitor + DirectSender p2p.DirectSender + Logger p2p.Logger + Marshaller p2p.Marshaller + NetworkType p2p.NetworkType + OutgoingCLB ChannelLoadBalancer + PeerID core.PeerID + PeersRatingHandler p2p.PeersRatingHandler + PubSub PubSub + SyncTimer p2p.SyncTimer + Throttler core.Throttler + type ArgsNetworkMessenger struct + ConnectionWatcherType string + Logger p2p.Logger + Marshaller p2p.Marshaller + NetworkType p2p.NetworkType + P2pConfig config.P2PConfig + P2pKeyGenerator commonCrypto.KeyGenerator + P2pPrivateKey commonCrypto.PrivateKey + P2pSingleSigner commonCrypto.SingleSigner + PeersRatingHandler p2p.PeersRatingHandler + PreferredPeersHolder p2p.PreferredPeersHolderHandler + SyncTimer p2p.SyncTimer + type ChannelLoadBalancer interface + AddChannel func(channel string) error + Close func() error + CollectOneElementFromChannels func() *SendableData + GetChannelOrDefault func(channel string) chan *SendableData + IsInterfaceNil func() bool + RemoveChannel func(channel string) error + type ConnectableHost interface + AddressToPeerInfo func(address string) (*peer.AddrInfo, error) + ConnectToPeer func(ctx context.Context, address string) error + IsInterfaceNil func() bool + type ConnectionMonitor interface + Close func() error + IsConnectedToTheNetwork func(netw network.Network) bool + IsInterfaceNil func() bool + PeerDenialEvaluator func() p2p.PeerDenialEvaluator + SetPeerDenialEvaluator func(handler p2p.PeerDenialEvaluator) error + SetThresholdMinConnectedPeers func(thresholdMinConnectedPeers int, netw network.Network) + ThresholdMinConnectedPeers func() int + type ConnectionsMetric interface + IsInterfaceNil func() bool + ResetNumConnections func() uint32 + ResetNumDisconnections func() uint32 + type LocalSyncTimer struct + func (lst *LocalSyncTimer) CurrentTime() time.Time + func (lst *LocalSyncTimer) IsInterfaceNil() bool + type MutexHolder struct + func NewMutexHolder(mutexesCapacity int) (*MutexHolder, error) + func (mh *MutexHolder) Get(key string) *sync.Mutex + type PeerDiscovererWithSharder interface + SetSharder func(sharder p2p.Sharder) error + type PeerInfoHandler func(pInfo peer.AddrInfo) + type PeersOnChannel interface + Close func() error + ConnectedPeersOnChannel func(topic string) []core.PeerID + IsInterfaceNil func() bool + type PubSub interface + GetTopics func() []string + Join func(topic string, opts ...pubsub.TopicOpt) (*pubsub.Topic, error) + ListPeers func(topic string) []peer.ID + RegisterTopicValidator func(topic string, val interface{}, opts ...pubsub.ValidatorOpt) error + UnregisterTopicValidator func(topic string) error + type PubSubSubscription interface + Cancel func() + Next func(ctx context.Context) (*pubsub.Message, error) + Topic func() string + type PubSubTopic interface + Close func() error + Publish func(ctx context.Context, data []byte, opts ...pubsub.PubOpt) error + Subscribe func(opts ...pubsub.SubOpt) (*pubsub.Subscription, error) + type SendableData struct + Buff []byte + ID peer.ID + Sk crypto.PrivKey + Topic string + type TopicProcessor interface + AddTopicProcessor func(identifier string, processor p2p.MessageProcessor) error + GetList func() ([]string, []p2p.MessageProcessor) + IsInterfaceNil func() bool + RemoveTopicProcessor func(identifier string) error