Documentation ¶
Index ¶
- Constants
- func LoadConfigMap(path string) (map[interface{}]interface{}, error)
- func LoadIdentityConfigFromMap(cfgmap map[interface{}]interface{}) (*identity.Config, error)
- func SetConfigMapFlags(cfgmap map[interface{}]interface{}, flags map[string]*pflag.Flag)
- type Config
- type Router
- func (self *Router) Channel() channel2.Channel
- func (self *Router) DefaultRequestTimeout() time.Duration
- func (self *Router) GetConfig() *Config
- func (self *Router) GetMetricsRegistry() metrics.UsageRegistry
- func (self *Router) GetVersionInfo() common.VersionProvider
- func (self *Router) HandleDebug(conn io.ReadWriter) error
- func (self *Router) MetricsRegistry() metrics.UsageRegistry
- func (self *Router) RegisterDebugOp(opId byte, f func(c *bufio.ReadWriter) error)
- func (self *Router) RegisterDefaultDebugOps()
- func (self *Router) RegisterXWebHandlerFactory(x xweb.WebHandlerFactory) error
- func (self *Router) RegisterXctrl(x xctrl.Channel2Xctrl) error
- func (self *Router) RegisterXweb(x xweb.Xweb) error
- func (self *Router) Run() error
- func (self *Router) Shutdown() error
- func (self *Router) Start() error
- type RouterMonitor
Constants ¶
View Source
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" )
View Source
const ( TimeFormatYear = "2006" TimeFormatMonth = "01" TimeFormatDay = "02" TimeFormatHour = "15" TimeFormatMinute = "04" TimeFormatSeconds = "05" TimestampFormat = TimeFormatYear + TimeFormatMonth + TimeFormatDay + TimeFormatHour + TimeFormatMinute + TimeFormatSeconds )
View Source
const ( DumpForwarderTables byte = 1 UpdateRoute byte = 2 CloseControlChannel byte = 3 OpenControlChannel byte = 4 )
Variables ¶
This section is empty.
Functions ¶
func LoadConfigMap ¶
func LoadIdentityConfigFromMap ¶ added in v0.16.119
func SetConfigMapFlags ¶
Types ¶
type Config ¶
type Config struct { Id *identity.TokenId Forwarder *forwarder.Options Trace struct { Handler *channel2.TraceHandler } Profile struct { Memory struct { Path string Interval time.Duration } CPU struct { Path string } } Ctrl struct { Endpoint transport.Address DefaultRequestTimeout time.Duration Options *channel2.Options } 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 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) 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) GetMetricsRegistry ¶ added in v0.16.117
func (self *Router) GetMetricsRegistry() metrics.UsageRegistry
func (*Router) GetVersionInfo ¶ added in v0.16.117
func (self *Router) GetVersionInfo() common.VersionProvider
func (*Router) HandleDebug ¶ added in v0.15.24
func (self *Router) HandleDebug(conn io.ReadWriter) error
func (*Router) MetricsRegistry ¶ added in v0.16.12
func (self *Router) MetricsRegistry() metrics.UsageRegistry
func (*Router) RegisterDebugOp ¶ added in v0.16.67
func (self *Router) RegisterDebugOp(opId byte, f func(c *bufio.ReadWriter) error)
func (*Router) RegisterDefaultDebugOps ¶ added in v0.16.67
func (self *Router) RegisterDefaultDebugOps()
func (*Router) RegisterXWebHandlerFactory ¶ added in v0.16.71
func (self *Router) RegisterXWebHandlerFactory(x xweb.WebHandlerFactory) error
func (*Router) RegisterXctrl ¶
func (self *Router) RegisterXctrl(x xctrl.Channel2Xctrl) error
type RouterMonitor ¶
type RouterMonitor interface {
Monitor()
}
Click to show internal directories.
Click to hide internal directories.