config

package
v0.0.0-...-8992419 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

type Agent struct {
	Name          string `yaml:"name"`
	IPAddress     string `yaml:"ip_address"`
	SNMPCommunity string `yaml:"snmp_community"`
	SampleRate    uint64 `yaml:"sample_rate"`
}

Agent represents an agent config

type Annotator

type Annotator struct {
	Name   string
	Target string
}

Annotator represents annotator configuration

type BGPAugment

type BGPAugment struct {
	Enabled     bool   `yaml:"enabled"`
	BIRDSocket  string `yaml:"bird_socket"`
	BIRD6Socket string `yaml:"bird6_socket"`
}

BGPAugment represents BGP augmentation configuration

type Config

type Config struct {
	AggregationPeriod            int64  `yaml:"aggregation_period"`
	DefaultSNMPCommunity         string `yaml:"default_snmp_community"`
	InterfaceMapperRefreshPeriod int64  `yaml:"interface_mapper_refresh_period"`
	Debug                        int    `yaml:"debug"`
	CompressionLevel             *int   `yaml:"compression_level"`
	DataDir                      string `yaml:"data_dir"`
	Anonymize                    bool   `yaml:"anonymize"`
	CacheTime                    *int64 `yaml:"cache_time"`

	NetflowV9       *Server     `yaml:"netflow_v9"`
	IPFIX           *Server     `yaml:"ipfix"`
	Sflow           *Server     `yaml:"sflow"`
	Frontend        *Server     `yaml:"frontend"`
	BGPAugmentation *BGPAugment `yaml:"bgp_augmentation"`
	Agents          []Agent     `yaml:"agents"`
	Annotators      []Annotator `yaml:"annotators"`

	AgentsNameByIP map[string]string
}

Config represents a yaml config file

func New

func New(filename string) (*Config, error)

New reads a configuration file and returns a Config

type Server

type Server struct {
	Enabled *bool  `yaml:"enabled"`
	Listen  string `yaml:"listen"`
}

Server represents a server config

Jump to

Keyboard shortcuts

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