Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeInfoProvider ¶
type NodeInfoProvider struct {
// contains filtered or unexported fields
}
func NewNodeInfoProvider ¶
func NewNodeInfoProvider(params NodeInfoProviderParams) *NodeInfoProvider
func (*NodeInfoProvider) GetNodeInfo ¶
func (n *NodeInfoProvider) GetNodeInfo(ctx context.Context) model.NodeInfo
func (*NodeInfoProvider) RegisterComputeInfoProvider ¶
func (n *NodeInfoProvider) RegisterComputeInfoProvider(provider model.ComputeNodeInfoProvider)
RegisterComputeInfoProvider registers a compute info provider with the node info provider.
type NodeInfoProviderParams ¶
type NodeInfoProviderParams struct { Host host.Host IdentityService identify.IDService Labels map[string]string ComputeInfoProvider model.ComputeNodeInfoProvider BacalhauVersion model.BuildVersionInfo }
type NodeInfoPublisher ¶
type NodeInfoPublisher struct {
// contains filtered or unexported fields
}
func NewNodeInfoPublisher ¶
func NewNodeInfoPublisher(params NodeInfoPublisherParams) *NodeInfoPublisher
func (*NodeInfoPublisher) Publish ¶
func (n *NodeInfoPublisher) Publish(ctx context.Context) error
Publish publishes the node info to the pubsub topic manually and won't wait for the background task to do it.
func (*NodeInfoPublisher) Stop ¶
func (n *NodeInfoPublisher) Stop(ctx context.Context)
Stop stops the background task that publishes the node info periodically
type NodeInfoPublisherParams ¶
type NodeInfoStore ¶
type NodeInfoStore interface { libp2p_routing.PeerRouting // Add adds a node info to the repo. Add(ctx context.Context, nodeInfo model.NodeInfo) error // Get returns the node info for the given peer ID. Get(ctx context.Context, peerID peer.ID) (model.NodeInfo, error) // List returns a list of nodes List(ctx context.Context) ([]model.NodeInfo, error) // ListForEngine returns a list of nodes that support the given engine. ListForEngine(ctx context.Context, engine model.Engine) ([]model.NodeInfo, error) // Delete deletes a node info from the repo. Delete(ctx context.Context, peerID peer.ID) error }
Click to show internal directories.
Click to hide internal directories.