router

package
v0.11.60 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 35 Imported by: 5

Documentation

Index

Constants

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
		Options  *channel2.Options
	}
	Link struct {
		Listeners []map[interface{}]interface{}
		Dialers   []map[interface{}]interface{}
	}
	Dialers   map[string]xgress.OptionsData
	Listeners []listenerBinding
	Transport map[interface{}]interface{}
	// 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) *Router

func (*Router) Channel

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

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