config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2017 License: MPL-2.0 Imports: 4 Imported by: 6

Documentation

Overview

Package config is a central location for configuration options. It also contains config file parsing logic.

Index

Constants

This section is empty.

Variables

View Source
var (
	// collectors
	ListenHttp = "127.0.0.1:1234" // address the api and http log collectors listen on
	ListenUdp  = "127.0.0.1:1234" // address the udp log collector listens on
	ListenTcp  = "127.0.0.1:1235" // address the tcp log collector listens on

	// drains
	PubAddress = ""                             // publisher address // mist://127.0.0.1:1445
	PubAuth    = ""                             // publisher auth token
	DbAddress  = "boltdb:///var/db/logvac.bolt" // database address

	// authenticator
	AuthAddress = "boltdb:///var/db/log-auth.bolt" // address or file location of auth backend ('boltdb:///var/db/logvac.bolt' or 'postgresql://127.0.0.1')

	// other
	CorsAllow = "*"            // sets `Access-Control-Allow-Origin` header
	LogKeep   = `{"app":"2w"}` // LogType and expire (X(m)in, (h)our,  (d)ay, (w)eek, (y)ear) (1, 10, 100 == keep up to that many) // todo: maybe map[string]interface
	LogType   = "app"          // default incoming log type when not set
	LogLevel  = "info"         // level which logvac will log at
	Token     = "secret"       // token to connect to logvac's api
	Log       lumber.Logger    // logger to write logs
	Insecure  = false          // whether or not to start insecure
	Server    = false          // whether or not to start logvac as a server
	Version   = false          // whether or not to print version info and exit
)

Functions

func AddFlags

func AddFlags(cmd *cobra.Command)

AddFlags adds cli flags to logvac

func ReadConfigFile

func ReadConfigFile(configFile string) error

ReadConfigFile reads in the config file, if any

Types

This section is empty.

Jump to

Keyboard shortcuts

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