config

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: GPL-3.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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