config

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//AppName name of the app
	AppName string

	//BindAddress where app server should listen
	BindAddress string

	//BindAddressInternal where internal server should listen
	BindAddressInternal string

	//TLSEnabled is TLS enabled
	TLSEnabled bool

	//TLSCert TLS cert file to use
	TLSCert string

	//TLSKey TLS key file to use
	TLSKey string

	//RulesFile path where the rules file located
	RulesFile string

	//Rules rules
	Rules []Rule
)
View Source
var (
	//LogLevel app-wide logger level
	LogLevel logrus.Level

	//LogFormat app-wide log formatter
	LogFormat logrus.Formatter

	//AppLogger app-wide logger
	AppLogger *CustomLogger
)
View Source
var (
	Version   = "undefined"
	GitCommit = "undefined"
	GitState  = "undefined"
	BuildDate = "undefined"
)

Functions

func LoadRules

func LoadRules() (string, bool)

LoadRules initialize rules from config source

func TLSConfig

func TLSConfig() (*tls.Config, error)

TLSConfig returns HTTP TLS config

Types

type CustomLogger

type CustomLogger struct{ *logrus.Logger }

CustomLogger logrus logger with helper methods

func (*CustomLogger) WithData

func (l *CustomLogger) WithData(data interface{}) *logrus.Entry

WithData embed data field

type Rule

type Rule struct {
	Selector    labels.Set        `yaml:"selector" json:"selector"`
	Annotations map[string]string `yaml:"annotations" json:"annotations"`
}

Rule defines annotation rule

Jump to

Keyboard shortcuts

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