transport

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const NodeInfoTopic = "bacalhau-node-info"

Variables

This section is empty.

Functions

This section is empty.

Types

type Libp2pTransport

type Libp2pTransport struct {
	Host host.Host
	// contains filtered or unexported fields
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL