env

package
v1.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IntervalSize time.Duration

Functions

This section is empty.

Types

type ConnectEventsConfig added in v1.2.0

type ConnectEventsConfig struct {
	Enabled          bool
	BatchInterval    time.Duration
	MaxQueuedEvents  int64
	FullSyncInterval time.Duration
}

type CtrlDialer

type CtrlDialer func(address transport.Address, bindHandler channel.BindHandler) error

type HeartbeatOptions

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

func NewDefaultHeartbeatOptions

func NewDefaultHeartbeatOptions() *HeartbeatOptions

func NewHeartbeatOptions

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

type NetworkController

type NetworkController interface {
	Channel() channel.Channel
	Address() string
	Latency() time.Duration
	HeartbeatCallback() channel.HeartbeatCallback
	IsUnresponsive() bool

	GetVersion() *versions.VersionInfo
	TimeSinceLastContact() time.Duration
	IsConnected() bool
	// contains filtered or unexported methods
}

type NetworkControllers

type NetworkControllers interface {
	UpdateControllerEndpoints(endpoints []string, leaderId string) bool
	GetAll() map[string]NetworkController
	GetNetworkController(ctrlId string) NetworkController
	AnyCtrlChannel() channel.Channel
	GetModelUpdateCtrlChannel() channel.Channel
	GetIfResponsive(ctrlId string) (channel.Channel, bool)
	AllResponsiveCtrlChannels() []channel.Channel
	AnyValidCtrlChannel() channel.Channel
	GetCtrlChannel(ctrlId string) channel.Channel
	DefaultRequestTimeout() time.Duration
	ForEach(f func(ctrlId string, ch channel.Channel))
	Close() error
	Inspect() *inspect.ControllerInspectDetails
}

func NewNetworkControllers

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

type RouterEnv

type RouterEnv interface {
	GetNetworkControllers() NetworkControllers
	GetRouterId() *identity.TokenId
	GetDialerCfg() map[string]xgress.OptionsData
	GetXlinkDialers() []xlink.Dialer
	GetXrctrls() []Xrctrl
	GetTraceHandler() *channel.TraceHandler
	GetXlinkRegistry() xlink.Registry
	GetCloseNotify() <-chan struct{}
	GetMetricsRegistry() metrics.UsageRegistry
	RenderJsonConfig() (string, error)
	GetHeartbeatOptions() HeartbeatOptions
	GetRateLimiterPool() goroutines.Pool
	GetCtrlRateLimiter() rate.AdaptiveRateLimitTracker
	GetVersionInfo() versions.VersionProvider
	GetRouterDataModel() *common.RouterDataModel
	GetConnectEventsConfig() *ConnectEventsConfig
}

type Xrctrl

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