Documentation ¶
Overview ¶
Package envlion provides simple utilities to setup lion from the environment.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Env ¶
type Env struct { // The log app name, will default to app if not set. LogAppName string `env:"LOG_APP_NAME,default=app"` // The level to log at, must be one of DEBUG, INFO, WARN, ERROR, FATAL, PANIC. LogLevel string `env:"LOG_LEVEL"` // LogDisableStderr says to disable logging to stderr. LogDisableStderr bool `env:"LOG_DISABLE_STDERR"` // The syslog network, either udp or tcp. // Must be set with SyslogAddress. // If not set and LogDir not set, logs will be to stderr. SyslogNetwork string `env:"SYSLOG_NETWORK"` // The syslog host:port. // Must be set with SyslogNetwork. // If not set and LogDir not set, logs will be to stderr. SyslogAddress string `env:"SYSLOG_ADDRESS"` // The current token. // Must be set with CurrentSyslogNetwork or CurrentStderr. CurrentToken string `env:"CURRENT_TOKEN"` // The current syslog host:port. // Must be set with CurrentToken. CurrentSyslogAddress string `env:"CURRENT_SYSLOG_ADDRESS"` // Output logs in current format to stdout. CurrentStdout bool `env:"CURRENT_STDOUT"` }
Env defines a struct for environment variables that can be parsed with go.pedge.io/env.
Click to show internal directories.
Click to hide internal directories.