config

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: MIT 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 {
	LogPath               string        `yaml:"log_path"`
	MetricsOutput         string        `yaml:"metrics_output"`
	ServerID              string        `yaml:"server_id"`
	ServerIDPath          string        `yaml:"server_id_path"`
	SDPInstance           string        `yaml:"sdp_instance"`
	UpdateInterval        time.Duration `yaml:"update_interval"`
	OutputCmdsByUser      bool          `yaml:"output_cmds_by_user"`
	OutputCmdsByUserRegex string        `yaml:"output_cmds_by_user_regex"`
	OutputCmdsByIP        bool          `yaml:"output_cmds_by_ip"`
	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