router

package
v0.16.21 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2021 License: Apache-2.0 Imports: 43 Imported by: 5

Documentation

Index

Constants

View Source
const (
	DumpForwarderTables byte = 1
	UpdateRoute         byte = 2
	CloseControlChannel byte = 3
	OpenControlChannel  byte = 4
)
View Source
const (
	FlagsCfgMapKey = "@flags"
)

Variables

This section is empty.

Functions

func LoadConfigMap

func LoadConfigMap(path string) (map[interface{}]interface{}, error)

func SetConfigMapFlags

func SetConfigMapFlags(cfgmap map[interface{}]interface{}, flags map[string]*pflag.Flag)

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
	}
	// contains filtered or unexported fields
}

func LoadConfig

func LoadConfig(path string) (*Config, error)

func (*Config) Configure

func (config *Config) Configure(sub config.Subconfig) error

func (*Config) SetFlags

func (config *Config) SetFlags(flags map[string]*pflag.Flag)

type Router

type Router struct {
	// contains filtered or unexported fields
}

func Create

func Create(config *Config, versionProvider common.VersionProvider) *Router

func (*Router) Channel

func (self *Router) Channel() channel2.Channel

func (*Router) DefaultRequestTimeout added in v0.16.7

func (self *Router) DefaultRequestTimeout() time.Duration

func (*Router) HandleDebug added in v0.15.24

func (router *Router) HandleDebug(conn io.ReadWriter) error

func (*Router) MetricsRegistry added in v0.16.12

func (self *Router) MetricsRegistry() metrics.UsageRegistry

func (*Router) RegisterXctrl

func (self *Router) RegisterXctrl(x xctrl.Xctrl) error

func (*Router) Run

func (self *Router) Run() error

func (*Router) Shutdown

func (self *Router) Shutdown() error

func (*Router) Start

func (self *Router) Start() error

type RouterMonitor

type RouterMonitor interface {
	Monitor()
}

Jump to

Keyboard shortcuts

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