env

package
v0.22.48 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtrlChannel added in v0.21.0

type CtrlChannel interface {
	Channel() channel.Channel
	DefaultRequestTimeout() time.Duration
}

type HeartbeatOptions added in v0.22.41

type HeartbeatOptions struct {
	channel.HeartbeatOptions
	UnresponsiveAfter time.Duration
}

func NewDefaultHeartbeatOptions added in v0.22.41

func NewDefaultHeartbeatOptions() *HeartbeatOptions

func NewHeartbeatOptions added in v0.22.41

func NewHeartbeatOptions(options *channel.HeartbeatOptions) (*HeartbeatOptions, error)

type NetworkController added in v0.21.0

type NetworkController interface {
	Channel() channel.Channel
	Latency() time.Duration
	HeartbeatCallback() channel.HeartbeatCallback
	IsUnresponsive() bool
	// contains filtered or unexported methods
}

type NetworkControllers added in v0.21.0

type NetworkControllers interface {
	Add(ch channel.Channel) (NetworkController, error)
	GetAll() map[string]NetworkController
	AnyCtrlChannel() channel.Channel
	GetCtrlChannel(ctrlId string) channel.Channel
	GetCtrlChannelByAddress(address string) (ctrlId string, ch channel.Channel)
	DefaultRequestTimeout() time.Duration
	ForEach(f func(ctrlId string, ch channel.Channel))
	Close() error
	CloseAndRemoveByAddress(address string) error
}

func NewNetworkControllers added in v0.21.0

func NewNetworkControllers(defaultRequestTimeout time.Duration, heartbeatOptions *HeartbeatOptions) NetworkControllers

type RouterEnv

type RouterEnv interface {
	GetNetworkControllers() NetworkControllers
	GetRouterId() *identity.TokenId
	GetDialerCfg() map[string]xgress.OptionsData
	GetXlinkDialer() []xlink.Dialer
	GetXrctrls() []Xrctrl
	GetTraceHandler() *channel.TraceHandler
	GetXlinkRegistry() xlink.Registry
	GetCloseNotify() <-chan struct{}
	GetMetricsRegistry() metrics.UsageRegistry
	RenderJsonConfig() (string, error)
	GetHeartbeatOptions() HeartbeatOptions
}

type Xrctrl added in v0.21.0

type Xrctrl interface {
	config.Subconfig
	channel.BindHandler
	Enabled() bool
	Run(env RouterEnv) error
	NotifyOfReconnect(ch channel.Channel)
	GetTraceDecoders() []channel.TraceMessageDecoder
}

An Xrctrl allows adding handlers to the router <-> controller connection on the router side. This means you can support additional message types/flows to extend the basic fabric functionality.

There is a corresponding Xctrl interface for extending communication on the controller side

Jump to

Keyboard shortcuts

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