Documentation ¶
Overview ¶
Package envvars contains environment variables parser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSAASHost ¶
GetSAASHost returns SaaS host env variable value if it's present and valid. Otherwise returns defaultSaaSHost.
func ParseEnvVars ¶
func ParseEnvVars(envs []string) (envSettings *models.ChangeSettingsParams, errs []error, warns []string)
ParseEnvVars parses given environment variables.
Returns valid setting and two lists with errors and warnings. This function is mainly used in pmm-managed-init to early validate passed environment variables, and provide user warnings about unknown variables. In case of error, the docker run terminates. Short description of environment variables:
- PATH, HOSTNAME, TERM, HOME are default environment variables that will be ignored;
- DISABLE_UPDATES is a boolean flag to enable or disable pmm-server update;
- DISABLE_TELEMETRY is a boolean flag to enable or disable pmm telemetry (and disable STT if telemetry is disabled);
- METRICS_RESOLUTION, METRICS_RESOLUTION, METRICS_RESOLUTION_HR,
METRICS_RESOLUTION_LR are durations of metrics resolution;
- DATA_RETENTION is the duration of how long keep time-series data in ClickHouse;
- the environment variables prefixed with GF_ passed as related to Grafana.
Types ¶
type InvalidDurationError ¶
type InvalidDurationError string
InvalidDurationError invalid duration error.
func (InvalidDurationError) Error ¶
func (e InvalidDurationError) Error() string
Click to show internal directories.
Click to hide internal directories.