config

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllowedUnits = []string{"B", "kB", "MB", "GB", "TB", "PB", "KiB", "MiB", "GiB", "TiB", "PiB"}
View Source
var ConfigDir string
View Source
var PluginDir string
View Source
var Settings = new(settings)
View Source
var Version string

Functions

func Contains

func Contains(s []string, val string) bool

func FileExists

func FileExists(file string) bool

func ParseFile

func ParseFile(file string, defaultFile embed.FS) error

func ParseVersion added in v1.0.1

func ParseVersion(versionFile embed.FS)

Set the version to the version in the VERSION file if it doesn't already exist during build time (this is mostly for DEV)

Types

type CheckCfg

type CheckCfg struct {
	Hostname    string `yaml:"hostname"`
	Servicename string `yaml:"servicename"`
	Interval    string `yaml:"interval"`
	Endpoint    string `yaml:"endpoint"`
	Options     Values `yaml:"options"`
	Disabled    bool
	NextRun     time.Time
}

type SenderCfg

type SenderCfg struct {
	Name  string `yaml:"name"`
	Url   string `yaml:"url"`
	Token string `yaml:"token"`
	Type  string `yaml:"type"`
}

type Values

type Values struct {
	Check    bool
	Pretty   bool
	Plugin   string
	Name     string
	Path     string
	Args     []string
	Against  string
	Expected string
	Warning  string
	Critical string
	Delta    int
	// contains filtered or unexported fields
}

func ParseValues

func ParseValues(r *http.Request) Values

func (*Values) Units

func (v *Values) Units() string

Jump to

Keyboard shortcuts

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