config

package
v0.0.0-...-38ecb19 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package config is responsible for providing configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Modes      []string  `toml:"modes"`
	Expression string    `toml:"expression"`
	ScriptFile string    `toml:"scriptfile"`
	ScriptDir  string    `toml:"scriptdir"`
	BufferSize int       `toml:"buffersize"`
	Graphite   *Graphite `toml:"graphite"`
	UDP        *UDP      `toml:"udp"`
	TCP        *TCP      `toml:"tcp"`
	Logging    *Logging  `toml:"logging"`
}

Configuration represents the application's configuration

func (*Configuration) Logger

func (c *Configuration) Logger(source string) (logger zerolog.Logger)

Logger returns the application logger

type Graphite

type Graphite struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	Interval int    `toml:"interval"`
	Debug    bool   `toml:"debug"`
}

Graphite configuration

type Logging

type Logging struct {
	Type  string `toml:"type"`
	Level string `toml:"level"`
}

Logging configuration

type TCP

type TCP struct {
	Host string `toml:"host"`
	Port int    `toml:"port"`
}

TCP configuration

type UDP

type UDP struct {
	Host string `toml:"host"`
	Port int    `toml:"port"`
}

UDP configuration

Jump to

Keyboard shortcuts

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