config

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultConfigPath is a default config path
	DefaultConfigPath = "config.yml"
)

Variables

View Source
var (
	// ErrConfigFileMissing is a missing config file error
	ErrConfigFileMissing = errors.New("config file is missing")
)

Functions

This section is empty.

Types

type Data

type Data struct {
	Sources []Source `yaml:"sources"`
}

Data is a main config structure

func Parse

func Parse(path string) (*Data, error)

Parse parses config file

type Key

type Key struct {
	Key       string `yaml:"key"`
	Count     bool   `yaml:"count"`
	Timing    string `yaml:"timing"`
	Delimiter string `yaml:"delimiter"`
}

Key describes statsd keys and their metrics

type Source

type Source struct {
	Name       string `yaml:"source"`
	File       string `yaml:"file"`
	Template   string `yaml:"template"`
	Delimiter  string `yaml:"delimiter"`
	Prefix     string `yaml:"prefix"`
	Keys       []Key  `yaml:"keys"`
	NoFollow   bool   `yaml:"noFollow"`
	MustExists bool   `yaml:"mustExists"`
	ReOpen     bool   `yaml:"reOpen"`
	OffsetFile string `yaml:"offsetFile"`
}

Source describes log parser

Jump to

Keyboard shortcuts

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