Documentation ¶
Index ¶
- Constants
- type NATSTransport
- func (t *NATSTransport) CallbackProxy() compute.Callback
- func (t *NATSTransport) Close(ctx context.Context) error
- func (t *NATSTransport) ComputeProxy() compute.Endpoint
- func (t *NATSTransport) DebugInfoProviders() []model.DebugInfoProvider
- func (t *NATSTransport) GetConnectionInfo(ctx context.Context) interface{}
- func (t *NATSTransport) NodeInfoDecorator() models.NodeInfoDecorator
- func (t *NATSTransport) NodeInfoPubSub() pubsub.PubSub[models.NodeInfo]
- func (t *NATSTransport) RegisterComputeCallback(callback compute.Callback) error
- func (t *NATSTransport) RegisterComputeEndpoint(endpoint compute.Endpoint) error
- func (t *NATSTransport) RegisterNodeInfoConsumer(ctx context.Context, infostore routing.NodeInfoStore) error
- type NATSTransportConfig
Constants ¶
View Source
const NodeInfoSubjectPrefix = "node.info."
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NATSTransport ¶
type NATSTransport struct {
// contains filtered or unexported fields
}
func NewNATSTransport ¶
func NewNATSTransport(ctx context.Context, config NATSTransportConfig) (*NATSTransport, error)
func (*NATSTransport) CallbackProxy ¶
func (t *NATSTransport) CallbackProxy() compute.Callback
CallbackProxy returns the callback proxy.
func (*NATSTransport) Close ¶
func (t *NATSTransport) Close(ctx context.Context) error
Close closes the transport layer.
func (*NATSTransport) ComputeProxy ¶
func (t *NATSTransport) ComputeProxy() compute.Endpoint
ComputeProxy returns the compute proxy.
func (*NATSTransport) DebugInfoProviders ¶
func (t *NATSTransport) DebugInfoProviders() []model.DebugInfoProvider
DebugInfoProviders returns the debug info of the NATS transport layer
func (*NATSTransport) GetConnectionInfo ¶ added in v1.2.2
func (t *NATSTransport) GetConnectionInfo(ctx context.Context) interface{}
func (*NATSTransport) NodeInfoDecorator ¶
func (t *NATSTransport) NodeInfoDecorator() models.NodeInfoDecorator
NodeInfoDecorator returns the node info decorator.
func (*NATSTransport) NodeInfoPubSub ¶
func (t *NATSTransport) NodeInfoPubSub() pubsub.PubSub[models.NodeInfo]
NodeInfoPubSub returns the node info pubsub.
func (*NATSTransport) RegisterComputeCallback ¶
func (t *NATSTransport) RegisterComputeCallback(callback compute.Callback) error
RegisterComputeCallback registers a compute callback with the transport layer.
func (*NATSTransport) RegisterComputeEndpoint ¶
func (t *NATSTransport) RegisterComputeEndpoint(endpoint compute.Endpoint) error
RegisterComputeEndpoint registers a compute endpoint with the transport layer.
func (*NATSTransport) RegisterNodeInfoConsumer ¶ added in v1.2.2
func (t *NATSTransport) RegisterNodeInfoConsumer(ctx context.Context, infostore routing.NodeInfoStore) error
type NATSTransportConfig ¶
type NATSTransportConfig struct { NodeID string Port int AdvertisedAddress string Orchestrators []string IsRequesterNode bool // StoreDir is the directory where the NATS server will store its data StoreDir string // AuthSecret is a secret string that clients must use to connect. It is // only used by NATS servers; clients should supply the auth secret as the // user part of their Orchestrator URL. AuthSecret string // Cluster config for requester nodes to connect with each other ClusterName string ClusterPort int ClusterAdvertisedAddress string ClusterPeers []string }
func (*NATSTransportConfig) Validate ¶
func (c *NATSTransportConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.