util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CloudFlareAPIToken    string `mapstructure:"CLOUDFLARE_API_TOKEN"`
	CloudFlareZoneTag     string `mapstructure:"CLOUDFLARE_ZONE_TAG"`
	CloudFlareHostName    string `mapstructure:"CLOUDFLARE_HOSTNAME"`
	CloudFlareEndpointURL string `mapstructure:"CLOUDFLARE_ENDPOINT_URL"`
	PeriodSeconds         int32  `mapstructure:"PERIOD_SECONDS"`
	MetricsNamespace      string `mapstructure:"METRICS_NAMESPACE"`
}

Config defines the application config.

func LoadConfig

func LoadConfig(path string) (config Config, err error)

LoadConfig reads configuration from file or environment variables.

func (Config) Validate

func (c Config) Validate() []string

Validate validates the config.

Jump to

Keyboard shortcuts

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