brconf

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package brconf holds all of the global router state, for access by the router's various packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BR

type BR struct {
	// Profile enables cpu and memory profiling.
	Profile bool
	// RollbackFailAction indicates the action that should be taken
	// if the rollback fails.
	RollbackFailAction FailAction
}

BR contains the border router specific parts of the configuration.

func (*BR) ConfigName

func (cfg *BR) ConfigName() string

func (*BR) InitDefaults

func (cfg *BR) InitDefaults()

func (*BR) Sample

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

func (*BR) Validate

func (cfg *BR) Validate() error

type BRConf

type BRConf struct {
	// Topo contains the names of all local infrastructure elements, a map
	// of interface IDs to routers, and the actual topology.
	Topo itopo.Topology
	// IA is the current ISD-AS.
	IA addr.IA
	// BR is the topology information of this router.
	BR *topology.BRInfo
	// MasterKeys holds the local AS master keys.
	MasterKeys keyconf.Master
	// Dir is the configuration directory.
	Dir string
}

BRConf is the main config structure. It contains the dynamic configuration at runtime.

func Load

func Load(id, confDir string) (*BRConf, error)

Load sets up the configuration, loading it from the supplied config directory.

func WithNewTopo

func WithNewTopo(id string, topo itopo.Topology, oldConf *BRConf) (*BRConf, error)

WithNewTopo creates config that shares all content except fields related to topology with the oldConf.

type Config

type Config struct {
	General   env.General
	Features  env.Features
	Logging   env.Logging
	Metrics   env.Metrics
	Discovery Discovery
	BR        BR
}

Config is the border router configuration that is loaded from file.

func (*Config) ConfigName

func (cfg *Config) ConfigName() string

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 Discovery

type Discovery struct {
	idiscovery.Config
	// AllowSemiMutable indicates whether changes to the semi-mutable
	// section in the static topology are allowed.
	AllowSemiMutable bool
}

func (*Discovery) Sample

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

type FailAction

type FailAction string
const (
	// FailActionFatal indicates that the process exits on error.
	FailActionFatal FailAction = "Fatal"
	// FailActionContinue indicates that the process continues on error.
	FailActionContinue FailAction = "Continue"
)

func (*FailAction) UnmarshalText

func (f *FailAction) UnmarshalText(text []byte) error

func (*FailAction) Validate

func (f *FailAction) Validate() error

type SockConf

type SockConf struct {
	Default       SockType
	LocalType     SockType
	ExternalTypes map[common.IFIDType]SockType
}

func (SockConf) Ext

func (s SockConf) Ext(ifid common.IFIDType) SockType

func (SockConf) Loc

func (s SockConf) Loc() SockType

type SockType

type SockType string

Jump to

Keyboard shortcuts

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