config

package
v0.0.0-...-8501d73 Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: MIT Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Debug               bool   `env:"KIT_OVERWATCH_DEBUG" envDefault:"true"`
	ListenAddress       string `env:"KIT_OVERWATCH_LISTEN_ADDRESS" envDefault:":8080"`
	StatsDAddress       string `env:"KIT_OVERWATCH_STATSD_ADDRESS" envDefault:"localhost:8125"`
	StatsDPrefix        string `env:"KIT_OVERWATCH_STATSD_PREFIX" envDefault:"statsd.kit-overwatch.dev"`
	Namespace           string `env:"KIT_OVERWATCH_NAMESPACE" envDefault:"default"`
	InCluster           bool   `env:"KIT_OVERWATCH_IN_CLUSTER" envDefault:"false"`
	ClusterName         string `env:"KIT_OVERWATCH_CLUSTER_NAME" envDefault:"local"`
	ClusterHost         string `env:"KIT_OVERWATCH_CLUSTER_HOST" envDefault:"http://127.0.0.1:8001"`
	NotificationLevel   string `env:"KIT_OVERWATCH_NOTIFICATION_LEVEL" envDefault:"DEBUG"`
	MentionLabel        string `env:"KIT_OVERWATCH_MENTION_LABEL" envDefault:""`
	MentionDefault      string `env:"KIT_OVERWATCH_MENTION_DEFAULT" envDefault:"here"`
	NotifyLog           bool   `env:"KIT_OVERWATCH_NOTIFY_LOG" envDefault:"true"`
	NotifySlack         bool   `env:"KIT_OVERWATCH_NOTIFY_SLACK" envDefault:"false"`
	NotifySlackToken    string `env:"KIT_OVERWATCH_NOTIFY_SLACK_TOKEN" envDefault:""`
	NotifySlackAsUser   bool   `env:"KIT_OVERWATCH_NOTIFY_SLACK_AS_USER" envDefault:"false"`
	NotifySlackChannel  string `env:"KIT_OVERWATCH_NOTIFY_SLACK_CHANNEL" envDefault:""`
	NotifyDataDog       bool   `env:"KIT_OVERWATCH_NOTIFY_DATADOG" envDefault:"false"`
	NotifyDataDogApiKey string `env:"KIT_OVERWATCH_NOTIFY_DATADOG_APIKEY" envDefault:""`
	NotifyDataDogAppKey string `env:"KIT_OVERWATCH_NOTIFY_DATADOG_APPKEY" envDefault:""`
}

func New

func New() *Config

func (*Config) LoadEnvVars

func (c *Config) LoadEnvVars() error

Jump to

Keyboard shortcuts

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