Aliaksandr Valialkin
a105b71116
lib/envflag: use flag.Set for setting the flags from env vars
...
This should make visible the set flags at flag.Visit(), which is used later for logging
and exporting the `is_set` label for these flags at /metrics page
2021-10-20 00:46:53 +03:00
Aliaksandr Valialkin
90efb5831b
lib/envflag: add a link to docs for -envflag.enable
2021-08-11 10:32:40 +03:00
Aliaksandr Valialkin
b47444e69d
lib/envflag: add -envflag.prefix
for setting optional prefix for environment vars
2020-03-30 15:51:44 +03:00
Aliaksandr Valialkin
5e7b4795bd
lib/envflag: typo fix in docs to -envflag.enable
: envoronment->environment
2020-02-27 21:56:46 +02:00
Aliaksandr Valialkin
13ee8271d0
lib/envflag: substitute dots with underscores in env var names if -envflag.enable is set
...
See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/311
2020-02-24 21:15:11 +02:00
Aliaksandr Valialkin
fcdd95a6ef
lib/envflag: check for incorrect flag values read from environment vars
2020-02-10 16:09:03 +02:00
Aliaksandr Valialkin
9c5db9400c
lib/envflag: add -envflag.enable
command-line flag for enabling reading flags from environment vars
...
By default flags are read only from command line. They can be read from environment vars if `-envflag.enable` is set.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/311
2020-02-10 16:09:01 +02:00
Aliaksandr Valialkin
1010a57882
all: allow setting flags via environment vars
...
Now flags can be set via environment vars with the same names as flags.
Command-line flags override flags set via env vars.
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/311
2020-02-10 13:31:21 +02:00