Documentation ¶
Index ¶
- Constants
- func LoadConfigMap(path string) (map[interface{}]interface{}, error)
- func LoadIdentityConfigFromMap(cfgmap map[interface{}]interface{}) (*identity.Config, error)
- func NewLinkRegistry(ctrls env.NetworkControllers) *linkRegistryImpl
- func SetConfigMapFlags(cfgmap map[interface{}]interface{}, flags map[string]*pflag.Flag)
- type Config
- func (config *Config) Configure(sub config.Subconfig) error
- func (config *Config) CreateBackup() (string, error)
- func (config *Config) CurrentCtrlAddress() string
- func (config *Config) Save() error
- func (config *Config) SetFlags(flags map[string]*pflag.Flag)
- func (config *Config) UpdateControllerEndpoint(address string) error
- type Router
- func (self *Router) DefaultRequestTimeout() time.Duration
- func (self *Router) GetChannel(controllerId string) channel.Channel
- func (self *Router) GetCloseNotify() <-chan struct{}
- func (self *Router) GetConfig() *Config
- func (self *Router) GetDialerCfg() map[string]xgress.OptionsData
- func (self *Router) GetHeartbeatOptions() env.HeartbeatOptions
- func (self *Router) GetMetricsRegistry() metrics.UsageRegistry
- func (self *Router) GetNetworkControllers() env.NetworkControllers
- func (self *Router) GetRateLimiterPool() goroutines.Pool
- func (self *Router) GetRouterId() *identity.TokenId
- func (self *Router) GetTraceHandler() *channel.TraceHandler
- func (self *Router) GetVersionInfo() versions.VersionProvider
- func (self *Router) GetXlinkDialer() []xlink.Dialer
- func (self *Router) GetXlinkRegistry() xlink.Registry
- func (self *Router) GetXrctrls() []env.Xrctrl
- func (self *Router) HandleAgentAsyncOp(conn net.Conn) error
- func (self *Router) HandleAgentOp(conn net.Conn) error
- func (self *Router) RegisterAgentBindHandler(bindHandler channel.BindHandler)
- func (self *Router) RegisterAgentOp(opId byte, f func(c *bufio.ReadWriter) error)
- func (self *Router) RegisterDefaultAgentOps(debugEnabled bool)
- func (self *Router) RegisterXWebHandlerFactory(x xweb.ApiHandlerFactory) error
- func (self *Router) RegisterXrctrl(x env.Xrctrl) error
- func (self *Router) RegisterXweb(x xweb.Instance) error
- func (self *Router) RenderJsonConfig() (string, error)
- func (self *Router) Run() error
- func (self *Router) Shutdown() error
- func (self *Router) Start() error
- func (self *Router) UpdateCtrlEndpoints(endpoints []string)
- type RouterMonitor
- type UpdatableAddress
- func (c *UpdatableAddress) Dial(name string, i *identity.TokenId, timeout time.Duration, ...) (transport.Conn, error)
- func (c *UpdatableAddress) DialWithLocalBinding(name string, binding string, i *identity.TokenId, timeout time.Duration, ...) (transport.Conn, error)
- func (c *UpdatableAddress) Listen(name string, i *identity.TokenId, acceptF func(transport.Conn), ...) (io.Closer, error)
- func (c *UpdatableAddress) MarshalYAML() (interface{}, error)
- func (c *UpdatableAddress) MustListen(name string, i *identity.TokenId, acceptF func(transport.Conn), ...) io.Closer
- func (c *UpdatableAddress) Store(address transport.Address)
- func (c *UpdatableAddress) String() string
- func (c *UpdatableAddress) Type() string
- func (c *UpdatableAddress) UnmarshalYAML(value *yaml3.Node) error
Constants ¶
const ( // FlagsCfgMapKey is used as a key in the source configuration map to pass flags from // higher levels (i.e. CLI arguments) down through the stack w/o colliding w/ file // based configuration values FlagsCfgMapKey = "@flags" // PathMapKey is used to store a loaded configuration file's source path PathMapKey = "@file" // CtrlMapKey is the string key for the ctrl section CtrlMapKey = "ctrl" // CtrlEndpointMapKey is the string key for the ctrl.endpoint section CtrlEndpointMapKey = "endpoint" // CtrlEndpointsMapKey is the string key for the ctrl.endpoints section CtrlEndpointsMapKey = "endpoints" // CtrlEndpointBindMapKey is the string key for the ctrl.bind section CtrlEndpointBindMapKey = "bind" )
const ( TimeFormatYear = "2006" TimeFormatMonth = "01" TimeFormatDay = "02" TimeFormatHour = "15" TimeFormatMinute = "04" TimeFormatSeconds = "05" TimestampFormat = TimeFormatYear + TimeFormatMonth + TimeFormatDay + TimeFormatHour + TimeFormatMinute + TimeFormatSeconds )
const (
AgentAppId byte = 2
)
Variables ¶
This section is empty.
Functions ¶
func LoadConfigMap ¶
func LoadIdentityConfigFromMap ¶ added in v0.16.119
func NewLinkRegistry ¶ added in v0.17.60
func NewLinkRegistry(ctrls env.NetworkControllers) *linkRegistryImpl
func SetConfigMapFlags ¶
Types ¶
type Config ¶
type Config struct { Id *identity.TokenId EnableDebugOps bool Forwarder *forwarder.Options Trace struct { Handler *channel.TraceHandler } Profile struct { Memory struct { Path string Interval time.Duration } CPU struct { Path string } } Ctrl struct { InitialEndpoints []*UpdatableAddress LocalBinding string DefaultRequestTimeout time.Duration Options *channel.Options DataDir string Heartbeats env.HeartbeatOptions } Link struct { Listeners []map[interface{}]interface{} Dialers []map[interface{}]interface{} } Dialers map[string]xgress.OptionsData Listeners []listenerBinding Transport map[interface{}]interface{} Metrics struct { ReportInterval time.Duration IntervalAgeThreshold time.Duration MessageQueueSize int } HealthChecks struct { CtrlPingCheck struct { Interval time.Duration Timeout time.Duration InitialDelay time.Duration } } Plugins []string // contains filtered or unexported fields }
func LoadConfig ¶
func (*Config) CreateBackup ¶ added in v0.17.23
CreateBackup will attempt to use the current path value to create a backup of the file on disk. The resulting file path is returned.
func (*Config) CurrentCtrlAddress ¶ added in v0.17.26
func (*Config) Save ¶ added in v0.17.23
Save attempts to take the current config's src attribute and Save it as yaml to the path value.
func (*Config) UpdateControllerEndpoint ¶ added in v0.17.23
UpdateControllerEndpoint updates the runtime configuration address of the controller and the internal map configuration.
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (*Router) DefaultRequestTimeout ¶ added in v0.16.7
func (*Router) GetChannel ¶ added in v0.21.0
func (*Router) GetCloseNotify ¶ added in v0.17.134
func (self *Router) GetCloseNotify() <-chan struct{}
func (*Router) GetDialerCfg ¶ added in v0.17.134
func (self *Router) GetDialerCfg() map[string]xgress.OptionsData
func (*Router) GetHeartbeatOptions ¶ added in v0.22.41
func (self *Router) GetHeartbeatOptions() env.HeartbeatOptions
func (*Router) GetMetricsRegistry ¶ added in v0.16.117
func (self *Router) GetMetricsRegistry() metrics.UsageRegistry
func (*Router) GetNetworkControllers ¶ added in v0.21.0
func (self *Router) GetNetworkControllers() env.NetworkControllers
func (*Router) GetRateLimiterPool ¶ added in v0.22.73
func (self *Router) GetRateLimiterPool() goroutines.Pool
func (*Router) GetRouterId ¶ added in v0.17.134
func (*Router) GetTraceHandler ¶ added in v0.17.134
func (self *Router) GetTraceHandler() *channel.TraceHandler
func (*Router) GetVersionInfo ¶ added in v0.16.117
func (self *Router) GetVersionInfo() versions.VersionProvider
func (*Router) GetXlinkDialer ¶ added in v0.17.134
func (*Router) GetXlinkRegistry ¶ added in v0.17.134
func (*Router) GetXrctrls ¶ added in v0.21.0
func (*Router) HandleAgentAsyncOp ¶ added in v0.17.109
func (*Router) HandleAgentOp ¶ added in v0.17.109
func (*Router) RegisterAgentBindHandler ¶ added in v0.17.109
func (self *Router) RegisterAgentBindHandler(bindHandler channel.BindHandler)
func (*Router) RegisterAgentOp ¶ added in v0.17.109
func (self *Router) RegisterAgentOp(opId byte, f func(c *bufio.ReadWriter) error)
func (*Router) RegisterDefaultAgentOps ¶ added in v0.17.109
func (*Router) RegisterXWebHandlerFactory ¶ added in v0.16.71
func (*Router) RegisterXrctrl ¶ added in v0.21.0
func (*Router) RegisterXweb ¶ added in v0.16.71
func (*Router) RenderJsonConfig ¶ added in v0.22.29
func (*Router) UpdateCtrlEndpoints ¶ added in v0.22.15
type RouterMonitor ¶
type RouterMonitor interface {
Monitor()
}
type UpdatableAddress ¶ added in v0.17.26
type UpdatableAddress struct {
// contains filtered or unexported fields
}
UpdatableAddress allows a single address to be passed to multiple channel implementations and be centrally updated in a thread safe manner.
func NewUpdatableAddress ¶ added in v0.17.26
func NewUpdatableAddress(address transport.Address) *UpdatableAddress
NewUpdatableAddress create a new *UpdatableAddress which implements transport.Address and allow thread safe updating of the internal address
func (*UpdatableAddress) Dial ¶ added in v0.17.26
func (c *UpdatableAddress) Dial(name string, i *identity.TokenId, timeout time.Duration, tcfg transport.Configuration) (transport.Conn, error)
Dial implements transport.Address.Dial
func (*UpdatableAddress) DialWithLocalBinding ¶ added in v0.17.102
func (*UpdatableAddress) Listen ¶ added in v0.17.26
func (c *UpdatableAddress) Listen(name string, i *identity.TokenId, acceptF func(transport.Conn), tcfg transport.Configuration) (io.Closer, error)
Listen implements transport.Address.Listen
func (*UpdatableAddress) MarshalYAML ¶ added in v0.22.15
func (c *UpdatableAddress) MarshalYAML() (interface{}, error)
MarshalYAML handles serialization for the YAML format
func (*UpdatableAddress) MustListen ¶ added in v0.17.26
func (c *UpdatableAddress) MustListen(name string, i *identity.TokenId, acceptF func(transport.Conn), tcfg transport.Configuration) io.Closer
MustListen implements transport.Address.MustListen
func (*UpdatableAddress) Store ¶ added in v0.17.26
func (c *UpdatableAddress) Store(address transport.Address)
Store updates the address currently used by this configuration instance
func (*UpdatableAddress) String ¶ added in v0.17.26
func (c *UpdatableAddress) String() string
String implements transport.Address.String
func (*UpdatableAddress) Type ¶ added in v0.17.40
func (c *UpdatableAddress) Type() string
Type implements transport.Address.Type
func (*UpdatableAddress) UnmarshalYAML ¶ added in v0.22.15
func (c *UpdatableAddress) UnmarshalYAML(value *yaml3.Node) error
UnmarshalYAML handled deserialization for the YAML format