config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 6 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 {
	LogPath             string        `yaml:"log_path"`
	MetricsOutput       string        `yaml:"metrics_output"`
	ServerID            string        `yaml:"server_id"`
	SDPInstance         string        `yaml:"sdp_instance"`
	UpdateInterval      time.Duration `yaml:"update_interval"`
	OutputCmdsByUser    bool          `yaml:"output_cmds_by_user"`
	CaseSensitiveServer bool          `yaml:"case_senstive_server"`
}

Config for p4prometheus

func LoadConfigFile

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

LoadConfigFile - loads p4prometheus config file

func LoadConfigString

func LoadConfigString(content []byte) (*Config, error)

LoadConfigString - loads a string

func Unmarshal

func Unmarshal(config []byte) (*Config, error)

Unmarshal the config

Jump to

Keyboard shortcuts

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