mirror of
https://github.com/hanzoai/metrics.git
synced 2026-10-30 20:03:39 +00:00
### Describe Your Changes The PR https://github.com/VictoriaMetrics/VictoriaMetrics/pull/9942 was reverted in https://github.com/VictoriaMetrics/VictoriaMetrics/commit/9f787f9582ca9aec8d159f825e20c32d47116707 because of the import cycle in the enterprise VM. Needs more work. ### Checklist The following checks are **mandatory**: - [ ] My change adheres to [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/victoriametrics/contributing/#pull-request-checklist). - [ ] My change adheres to [VictoriaMetrics development goals](https://docs.victoriametrics.com/victoriametrics/goals/).
18 lines
646 B
Go
18 lines
646 B
Go
package envflag
|
|
|
|
import "github.com/VictoriaMetrics/VictoriaMetrics/lib/flagutil"
|
|
|
|
// secretFlagsList contains names of flags with secret values obtained from
|
|
// the `-secret.flags` command-line option.
|
|
var secretFlagsList = flagutil.NewArrayString("secret.flags",
|
|
"Comma-separated list of flag names with secret values. Values for these flags are hidden in logs and on /metrics page")
|
|
|
|
// applySecretFlags registers flags from `-secret.flags` after they are parsed.
|
|
//
|
|
// The function must be called inside envflag.Parse after parsing flags.
|
|
func applySecretFlags() {
|
|
for _, f := range *secretFlagsList {
|
|
flagutil.RegisterSecretFlag(f)
|
|
}
|
|
}
|