config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoCheckRules     = fmt.Errorf("No check rules defined.")
	ErrNoSuchConfigFile = fmt.Errorf("No such config file.")
	ErrEmptyConfigFile  = fmt.Errorf("The specified config file is empty.")
)

Functions

This section is empty.

Types

type CheckConfig added in v0.0.3

type CheckConfig struct {
	Rules []MetricCheckRule `yaml:"check"`
}

func NewCheckConfig added in v0.0.3

func NewCheckConfig(ctx context.Context, confPath string) (*CheckConfig, error)

NewCheckConfig returns the configuration content loaded from YAML.

func (*CheckConfig) Validate added in v0.0.3

func (c *CheckConfig) Validate() error

Validate returns the result of the validation.

type InterruptedInterval

type InterruptedInterval string

func (InterruptedInterval) ToValue

func (p InterruptedInterval) ToValue() int32

ToValue returns an int32 type value of the time interval from the string.

type MetricCheckRule added in v0.0.3

type MetricCheckRule struct {
	Name                string              `yaml:"name"`
	Service             string              `yaml:"service"`
	Roles               []string            `yaml:"roles"`
	InterruptedInterval InterruptedInterval `yaml:"interrupted_interval"`
	Providers           []Provider          `yaml:"providers"`
	InspectionMetrics   map[string][]string `yaml:"inspection_metrics"`
}

type Provider

type Provider string

Directories

Path Synopsis
s3

Jump to

Keyboard shortcuts

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