config

package
v0.0.0-...-54c5aff Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const VCLConfigDir = "/etc/varnish"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Namespace             string        `env:"NAMESPACE,required"`
	PodName               string        `env:"POD_NAME,required"`
	NodeName              string        `env:"NODE_NAME,required"`
	VarnishClusterName    string        `env:"VARNISH_CLUSTER_NAME,required"`
	VarnishClusterUID     types.UID     `env:"VARNISH_CLUSTER_UID,required"`
	VarnishClusterGroup   string        `env:"VARNISH_CLUSTER_GROUP,required"`
	VarnishClusterVersion string        `env:"VARNISH_CLUSTER_VERSION,required"`
	VarnishClusterKind    string        `env:"VARNISH_CLUSTER_KIND,required"`
	VarnishAdmArgs        []string      `env:"VARNISHADM_ARGS" envDefault:"-S /etc/varnish-secret/secret -T 127.0.0.1:6082" envSeparator:" " `
	VarnishPingTimeout    time.Duration `env:"VARNISHADM_PING_TIMEOUT" envDefault:"90s"`
	VarnishPingDelay      time.Duration `env:"VARNISHADM_PING_DELAY" envDefault:"200ms"`
	LogFormat             string        `env:"LOG_FORMAT,required"`
	LogLevel              zapcore.Level `env:"LOG_LEVEL,required"`
}

Config that reads in env variables

func Load

func Load() (*Config, error)

Load uses the caarlos0/env library to read in environment variables into a struct

Jump to

Keyboard shortcuts

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