config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 4 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 {
	Username       string   `yaml:"username"`
	Timeout        int      `yaml:"timeout"`
	Password       string   `yaml:"password"`
	SSHKey         string   `yaml:"ssh_key"`
	AllowedTargets []string `yaml:"allowed_targets"`
	Collectors     []string `yaml:"enabled_collectors"`
}

Config contains the information required by junos_collector to create SSH based NETCONF connections.

type Configuration

type Configuration struct {
	Config map[string]Config `yaml:"configs"`
	Global Global            `yaml:"global"`
}

Configuration contains a slice of all configurations in the format of a map, where the key is the name of the config and the values are a Config type.

func LoadConfigFile

func LoadConfigFile(path string, collectors []string) (*Configuration, error)

LoadConfigFile returns a Configs type from a passed file.

type Global

type Global struct {
	AllowedTargets []string `yaml:"allowed_targets"`
	Timeout        int      `yaml:"timeout"`
}

Global contains the global information required by junos_collector to create SSH based NETCONF connections.

Jump to

Keyboard shortcuts

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