control

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDataplane

func ConfigDataplane(dp Dataplane, cfg *Config) error

ConfigDataplane configures the data-plane with the new configuration.

func DeriveHFMacKey

func DeriveHFMacKey(k []byte) []byte

DeriveHFMacKey derives the MAC key from the given key.

Types

type BFD

type BFD topology.BFD

BFD is the configuration for the BFD sessions.

type Config

type Config struct {
	// Topo contains the names of all local infrastructure elements, a map
	// of interface IDs to routers, and the actual topology.
	Topo topology.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
}

Config stores the runtime configuration state of an ISD-AS context.

func LoadConfig

func LoadConfig(id, confDir string) (*Config, error)

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

func (*Config) String

func (cfg *Config) String() string

type Dataplane

type Dataplane interface {
	CreateIACtx(ia addr.IA) error
	AddInternalInterface(ia addr.IA, local net.UDPAddr) error
	AddExternalInterface(localIfID common.IFIDType, info LinkInfo, owned bool) error
	AddSvc(ia addr.IA, svc addr.HostSVC, ip net.IP) error
	DelSvc(ia addr.IA, svc addr.HostSVC, ip net.IP) error
	SetKey(ia addr.IA, index int, key common.RawBytes) error

	SetRevocation(ia addr.IA, ifid common.IFIDType, rev common.RawBytes) error
	DelRevocation(ia addr.IA, ifid common.IFIDType) error
}

Dataplane is the interface that a dataplane has to support to be controlled by this controller.

type IACtx

type IACtx struct {
	// Config is the router topology configuration
	Config *Config
	// DP is the underlying data plane.
	DP Dataplane
	// Discoverer is used to dynamically discover healthy service instances. If
	// nil, service health watching is disabled.
	Discoverer svchealth.Discoverer
	// Stop channel, used for ISD-AS context cleanup
	Stop chan struct{}
	// contains filtered or unexported fields
}

IACtx is the context for the router for a given IA.

func (*IACtx) Start

func (iac *IACtx) Start(wg *sync.WaitGroup) error

Start configures the dataplane for the given context.

type LinkEnd

type LinkEnd struct {
	IA   addr.IA
	Addr *net.UDPAddr
}

LinkEnd represents on end of a link.

type LinkInfo

type LinkInfo struct {
	Local    LinkEnd
	Remote   LinkEnd
	Instance string
	LinkTo   topology.LinkType
	BFD      BFD
	MTU      int
}

LinkInfo contains the information about a link between an internal and external router.

Directories

Path Synopsis
internal
metrics
Package metrics defines and exports router metrics to be scraped by prometheus.
Package metrics defines and exports router metrics to be scraped by prometheus.

Jump to

Keyboard shortcuts

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