configs

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: BSD-3-Clause Imports: 16 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 {
	ID      string    `json:"id" yaml:"id" toml:"id"`
	LogFile string    `json:"log_file" yaml:"log_file" toml:"log_file"`
	Metrics []*Metric `json:"metrics" yaml:"metrics" toml:"metrics"`
}

Config defines a log to watch.

func Load

func Load() ([]*Config, error)

Load reads the log configurations from log config directory.

type Metric

type Metric struct {
	Matcher    *regexp.Regexp
	Namer      *template.Template
	Tagger     *template.Template
	Type       string `json:"type" yaml:"type" toml:"type"`
	ValueKey   string
	Match      string `json:"match" yaml:"match" toml:"match"`
	Name       string `json:"name" yaml:"name" toml:"name"`
	Tags       string `json:"tags" toml:"tags" yaml:"tags"`
	MatchParts []string
}

Metric is a metric definition for the log config.

Jump to

Keyboard shortcuts

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