config

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SampleConfig = `` /* 2823-byte string literal not displayed */

SampleConfig shows a sample config file - this can be used as a template for creating your own config file and is also output if you run p4prometheus with the --sample.config flag.

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 - see SampleConfig for details

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