config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	RISTimeout    uint64 `yaml:"ris_timeout"`
	SNMPCommunity string `yaml:"snmp_community"`
	DefaultVRF    string `yaml:"default_vrf"`

	ListenSFlow string                         `yaml:"listen_sflow"`
	ListenIPFIX string                         `yaml:"listen_ipfix"`
	ListenHTTP  string                         `yaml:"listen_http"`
	Dicts       frontend.Dicts                 `yaml:"dicts"`
	Clickhouse  *clickhousegw.ClickhouseConfig `yaml:"clickhouse"`
	Routers     []*Router                      `yaml:"routers"`
	// contains filtered or unexported fields
}

Config represents a config file

func GetConfig

func GetConfig(fp string) (*Config, error)

GetConfig gets the configuration

func (*Config) GetDefaultVRF

func (c *Config) GetDefaultVRF() uint64

GetDefaultVRF gets the default VRF id

func (*Config) GetRISList

func (c *Config) GetRISList() []string

GetRISList gets a list of all referenced RIS instances

type Router

type Router struct {
	Name    string `yaml:"name"`
	Address string `yaml:"address"`

	RISInstances []string `yaml:"ris_instances"`
	VRFs         []string `yaml:"vrfs"`
	// contains filtered or unexported fields
}

Router represents a router

func (*Router) GetAddress

func (r *Router) GetAddress() bnet.IP

GetAddress gets a routers address

func (*Router) GetVRFs

func (r *Router) GetVRFs() []uint64

GetVRFs gets a routers VRFs

Jump to

Keyboard shortcuts

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