Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryAPI ¶
type DiscoveryAPI struct {
// contains filtered or unexported fields
}
type DiscoverySubmodule ¶
type DiscoverySubmodule struct { Bootstrapper *discovery.Bootstrapper BootstrapReady *moresync.Latch // PeerTracker maintains a list of peers. PeerTracker *discovery.PeerTracker // HelloHandler handle peer connections for the "hello" protocol. HelloHandler *discovery.HelloProtocolHandler // HelloHandler handle peer connections for the "hello" protocol. ExchangeHandler exchange.Server ExchangeClient exchange.Client PeerDiscoveryCallbacks []discovery.PeerDiscoveredCallback TipSetLoader discovery.GetTipSetFunc // contains filtered or unexported fields }
DiscoverySubmodule enhances the `Node` with peer discovery capabilities.
func NewDiscoverySubmodule ¶
func NewDiscoverySubmodule(ctx context.Context, genesiGetter discoveryConfig, config *config.Config, network *network.NetworkSubmodule, chainStore *chain.Store, messageStore *chain.MessageStore, ) (*DiscoverySubmodule, error)
NewDiscoverySubmodule creates a new discovery submodule.
func (*DiscoverySubmodule) API ¶
func (discovery *DiscoverySubmodule) API() *DiscoveryAPI
func (*DiscoverySubmodule) Start ¶
func (discovery *DiscoverySubmodule) Start(offline bool) error
Start starts the discovery submodule for a node. It blocks until bootstrap satisfies the configured security conditions.
func (*DiscoverySubmodule) Stop ¶
func (discovery *DiscoverySubmodule) Stop()
Stop stops the discovery submodule.
Click to show internal directories.
Click to hide internal directories.