Documentation ¶
Index ¶
- Constants
- type Libp2pTransport
- func (t *Libp2pTransport) CallbackProxy() compute.Callback
- func (t *Libp2pTransport) Close(ctx context.Context) error
- func (t *Libp2pTransport) ComputeProxy() compute.Endpoint
- func (t *Libp2pTransport) DebugInfoProviders() []model.DebugInfoProvider
- func (t *Libp2pTransport) ManagementProxy() compute.ManagementEndpoint
- func (t *Libp2pTransport) NodeInfoDecorator() models.NodeInfoDecorator
- func (t *Libp2pTransport) NodeInfoPubSub() pubsub.PubSub[models.NodeState]
- func (t *Libp2pTransport) RegisterComputeCallback(callback compute.Callback) error
- func (t *Libp2pTransport) RegisterComputeEndpoint(ctx context.Context, endpoint compute.Endpoint) error
- func (t *Libp2pTransport) RegisterManagementEndpoint(endpoint compute.ManagementEndpoint) error
- func (t *Libp2pTransport) RegisterNodeInfoConsumer(ctx context.Context, nodeInfoStore routing.NodeInfoStore) error
- type Libp2pTransportConfig
Constants ¶
View Source
const NodeInfoTopic = "bacalhau-node-info"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Libp2pTransport ¶
func NewLibp2pTransport ¶
func NewLibp2pTransport(ctx context.Context, config Libp2pTransportConfig, nodeInfoStore routing.NodeInfoStore, cfg types.MetricsConfig, ) (*Libp2pTransport, error)
func (*Libp2pTransport) CallbackProxy ¶
func (t *Libp2pTransport) CallbackProxy() compute.Callback
CallbackProxy returns the callback proxy.
func (*Libp2pTransport) Close ¶
func (t *Libp2pTransport) Close(ctx context.Context) error
Close closes the transport layer.
func (*Libp2pTransport) ComputeProxy ¶
func (t *Libp2pTransport) ComputeProxy() compute.Endpoint
ComputeProxy returns the compute proxy.
func (*Libp2pTransport) DebugInfoProviders ¶
func (t *Libp2pTransport) DebugInfoProviders() []model.DebugInfoProvider
DebugInfoProviders returns the debug info.
func (*Libp2pTransport) ManagementProxy ¶ added in v1.2.3
func (t *Libp2pTransport) ManagementProxy() compute.ManagementEndpoint
RegistrationProxy is not supported for the Libp2p transport and returns nil.
func (*Libp2pTransport) NodeInfoDecorator ¶
func (t *Libp2pTransport) NodeInfoDecorator() models.NodeInfoDecorator
NodeInfoDecorator returns the node info decorator.
func (*Libp2pTransport) NodeInfoPubSub ¶
func (t *Libp2pTransport) NodeInfoPubSub() pubsub.PubSub[models.NodeState]
NodeInfoPubSub returns the node info pubsub.
func (*Libp2pTransport) RegisterComputeCallback ¶
func (t *Libp2pTransport) RegisterComputeCallback(callback compute.Callback) error
RegisterComputeCallback registers a compute callback with the transport layer.
func (*Libp2pTransport) RegisterComputeEndpoint ¶
func (t *Libp2pTransport) RegisterComputeEndpoint(ctx context.Context, endpoint compute.Endpoint) error
RegisterComputeEndpoint registers a compute endpoint with the transport layer.
func (*Libp2pTransport) RegisterManagementEndpoint ¶ added in v1.2.3
func (t *Libp2pTransport) RegisterManagementEndpoint(endpoint compute.ManagementEndpoint) error
RegisterManagementEndpoint is not implemented for libp2p transport. Compute nodes using this transport can call this with no effect.
func (*Libp2pTransport) RegisterNodeInfoConsumer ¶ added in v1.2.2
func (t *Libp2pTransport) RegisterNodeInfoConsumer(ctx context.Context, nodeInfoStore routing.NodeInfoStore) error
type Libp2pTransportConfig ¶
type Libp2pTransportConfig struct { Host host.Host Peers []string ReconnectDelay time.Duration CleanupManager *system.CleanupManager }
func (*Libp2pTransportConfig) Validate ¶
func (c *Libp2pTransportConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.