transport

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TransportLayer

type TransportLayer interface {
	// ComputeProxy enables orchestrator nodes to send job requests to compute nodes.
	ComputeProxy() compute.Endpoint

	// CallbackProxy enables compute nodes to send results and responses back to orchestrator nodes
	CallbackProxy() compute.Callback

	// NodeInfoPubSub enables compute nodes to publish their info and capabilities
	// to orchestrator nodes for job matching and discovery.
	NodeInfoPubSub() pubsub.PubSub[models.NodeInfo]

	// NodeInfoDecorator enables transport layer to enrich node info with data
	// required for request routing
	NodeInfoDecorator() models.NodeInfoDecorator

	// DebugInfoProviders enables transport layer to provide meaningful debug info to operators
	DebugInfoProviders() []model.DebugInfoProvider

	// GetConnectionInfo retrieves information relevant to the transport layer for those that
	// require it.
	GetConnectionInfo(ctx context.Context) interface{}

	// RegisterNodeInfoConsumer registers a node info consumer with the transport layer
	RegisterNodeInfoConsumer(ctx context.Context, infostore routing.NodeInfoStore) error

	// RegisterComputeCallback registers a compute callback with the transport layer
	// so that incoming compute responses are forwarded to the handler
	RegisterComputeCallback(callback compute.Callback) error

	// RegisterComputeEndpoint registers a compute endpoint with the transport layer
	// so that incoming orchestrator requests are forwarded to the handler
	RegisterComputeEndpoint(endpoint compute.Endpoint) error

	// Close closes the transport layer.
	Close(ctx context.Context) error
}

TransportLayer is the interface for the transport layer.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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