config

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package config defines the router's configuration file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BFD added in v0.11.0

type BFD struct {
	Disable               bool         `toml:"disable,omitempty"`
	DetectMult            uint8        `toml:"detect_mult,omitempty"`
	DesiredMinTxInterval  util.DurWrap `toml:"desired_min_tx_interval,omitempty"`
	RequiredMinRxInterval util.DurWrap `toml:"required_min_rx_interval,omitempty"`
}

BFD configuration. Unfortunately cannot be shared with topology.BFD as one is toml and the other json. Eventhough the semantics are identical.

type Config

type Config struct {
	General  env.General  `toml:"general,omitempty"`
	Features env.Features `toml:"features,omitempty"`
	Logging  log.Config   `toml:"log,omitempty"`
	Metrics  env.Metrics  `toml:"metrics,omitempty"`
	API      api.Config   `toml:"api,omitempty"`
	Router   RouterConfig `toml:"router,omitempty"`
}

func (*Config) InitDefaults

func (cfg *Config) InitDefaults()

func (*Config) Sample

func (cfg *Config) Sample(dst io.Writer, path config.Path, _ config.CtxMap)

func (*Config) Validate

func (cfg *Config) Validate() error

type RouterConfig added in v0.9.0

type RouterConfig struct {
	ReceiveBufferSize     int `toml:"receive_buffer_size,omitempty"`
	SendBufferSize        int `toml:"send_buffer_size,omitempty"`
	NumProcessors         int `toml:"num_processors,omitempty"`
	NumSlowPathProcessors int `toml:"num_slow_processors,omitempty"`
	BatchSize             int `toml:"batch_size,omitempty"`
	BFD                   BFD `toml:"bfd,omitempty"`
}

func (*RouterConfig) ConfigName added in v0.9.0

func (cfg *RouterConfig) ConfigName() string

func (*RouterConfig) InitDefaults added in v0.9.0

func (cfg *RouterConfig) InitDefaults()

func (*RouterConfig) Sample added in v0.9.0

func (cfg *RouterConfig) Sample(dst io.Writer, path config.Path, ctx config.CtxMap)

func (*RouterConfig) Validate added in v0.9.0

func (cfg *RouterConfig) Validate() error

Jump to

Keyboard shortcuts

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