config

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 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

	//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 app version
	Version = "undefined"

	//GitCommit git commit
	GitCommit = "undefined"

	//GitState git state
	GitState = "undefined"

	//BuildDate build date
	BuildDate = "undefined"
)

Functions

func InitRules added in v0.3.3

func InitRules() error

InitRules 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

func LoadRules

func LoadRules(path string) ([]Rule, error)

LoadRules load rules from config source

Jump to

Keyboard shortcuts

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