config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2018 License: MIT Imports: 3 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 {
	Address        string
	ConsoleSink    ConsoleSink
	FilesystemSink FilesystemSink
	FilterType     string
	LogFile        string
	LogFormat      string
	LogLevel       string
	MutatorType    string
	RegexFilter    RegexFilter
	SinkType       string
	SocketType     string
}

Config holds all configuration for our program

func NewConfig

func NewConfig() *Config

NewConfig creates a Config instance

func (*Config) AddFlags

func (cnf *Config) AddFlags(fs *pflag.FlagSet)

AddFlags adds all the flags from the command line and the config file

func (*Config) InitFlags

func (cnf *Config) InitFlags()

InitFlags normalizes and parses the command line flags

type ConsoleSink

type ConsoleSink struct {
	Output string
}

ConsoleSink holds all configuration for the ConsoleSink sink

type FilesystemSink

type FilesystemSink struct {
	Filename     string
	MaxAge       int
	MaxBackups   int
	MaxSize      int
	OutputFormat string
}

FilesystemSink holds all configuration for the FilesystemSink sink

type RegexFilter

type RegexFilter struct {
	Regex string
}

RegexFilter holds regex configuration

Jump to

Keyboard shortcuts

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