config

package
v0.0.0-...-57e6299 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultTickRate           = 15 * time.Minute
	DefaultRestartThreshold   = 200
	DefaultAge                = 10 * time.Minute
	DefaultNotificationDelay  = 24 * time.Hour
	DefaultGracePeriod        = 24 * time.Hour
	StringTrue                = "true"
	FailureDetectedAnnotation = "babylon.nais.io/failure-detected"
	GracePeriodAnnotation     = "babylon.nais.io/grace-period"
	StrategyAnnotation        = "babylon.nais.io/strategy"
	EnabledAnnotation         = "babylon.nais.io/enabled"
)

Variables

This section is empty.

Functions

func ConfigureUnleash

func ConfigureUnleash() (*unleash.Client, error)

func GetEnv

func GetEnv(name, fallback string) string

Types

type Config

type Config struct {
	Armed                bool
	LogLevel             string
	Port                 string
	TickRate             time.Duration
	RestartThreshold     int32
	ResourceAge          time.Duration
	NotificationDelay    time.Duration
	UseAllowedNamespaces bool
	AllowedNamespaces    []string
	GracePeriod          time.Duration
	ActiveTimeIntervals  map[string][]timeinterval.TimeInterval
	InfluxdbURI          string
	InfluxdbUsername     SecretToken
	InfluxdbPassword     SecretToken
	InfluxdbDatabase     string
	Cluster              string
}

func DefaultConfig

func DefaultConfig() Config

func ParseConfig

func ParseConfig() Config

type SecretToken

type SecretToken string

func (SecretToken) SecretString

func (ssu SecretToken) SecretString() string

func (SecretToken) String

func (ssu SecretToken) String() string

Jump to

Keyboard shortcuts

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