config

package
v0.0.0-...-0c5dbc6 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 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 Env

type Env struct {
	// Original configurations
	LogLevel       string        `envconfig:"LOG_LEVEL" default:"INFO"`
	KubeconfigPath string        `envconfig:"KUBE_CONFIG_PATH"`
	VerifyInterval time.Duration `envconfig:"INTERVAL" default:"12h"`
	AlertThreshold time.Duration `envconfig:"THRESHOLD" default:"336h"`
	Notifiers      []string      `envconfig:"NOTIFIERS" default:"log"`
	TestManager    bool          `envconfig:"SYNTHETICS_ENABLED" default:"false"`

	// Configration for Slack
	SlackToken   string `envconfig:"SLACK_TOKEN"`
	SlackChannel string `envconfig:"SLACK_CHANNEL"`

	// Configuration for Datadog
	DatadogAPIKey       string   `envconfig:"DATADOG_API_KEY" default:""`
	DatadogAppKey       string   `envconfig:"DATADOG_APPLICATION_KEY" default:""`
	AlertMessage        string   `envconfig:"SYNTHETICS_ALERT_MESSAGE" default:""`
	CheckInterval       int      `envconfig:"SYNTHETICS_CHECK_INTERVAL" default:"900"`
	Tags                []string `envconfig:"SYNTHETICS_TAGS" default:""`
	DefaultTag          string   `envconfig:"SYNTHETICS_DEFAULT_TAG" default:"managed-by-cert-expiry-mon"`
	DefaultLocations    []string `envconfig:"SYNTHETICS_DEFAULT_LOCATIONS" default:"aws:ap-northeast-1"`
	AdditionalEndpoints []string `envconfig:"SYNTHETICS_ADDITIONAL_ENDPOINTS" default:""`
}

Env struct defines configuration of controller that provided by ENV.

func (*Env) ParseEnv

func (e *Env) ParseEnv() error

ParseEnv function sets to Env struct and verify it. If varify failed, ParseEnv function returns the error immediately.

Jump to

Keyboard shortcuts

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