transport

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 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) (*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) NodeInfoDecorator

func (t *Libp2pTransport) NodeInfoDecorator() models.NodeInfoDecorator

NodeInfoDecorator returns the node info decorator.

func (*Libp2pTransport) NodeInfoPubSub

func (t *Libp2pTransport) NodeInfoPubSub() pubsub.PubSub[models.NodeInfo]

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(endpoint compute.Endpoint) error

RegisterComputeEndpoint registers a compute endpoint with the transport layer.

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