MCPcopy Create free account
hub / github.com/cortexproject/cortex / RegisterFlags

Method RegisterFlags

pkg/api/api.go:94–101  ·  view source on GitHub ↗

RegisterFlags adds the flags required to config this to the given FlagSet.

(f *flag.FlagSet)

Source from the content-addressed store, hash-verified

92
93// RegisterFlags adds the flags required to config this to the given FlagSet.
94func (cfg *Config) RegisterFlags(f *flag.FlagSet) {
95 f.BoolVar(&cfg.ResponseCompression, "api.response-compression-enabled", false, "Use GZIP compression for API responses. Some endpoints serve large YAML or JSON blobs which can benefit from compression.")
96 f.Var(&cfg.HTTPRequestHeadersToLog, "api.http-request-headers-to-log", "Which HTTP Request headers to add to logs")
97 f.StringVar(&cfg.RequestIdHeader, "api.request-id-header", "", "HTTP header that can be used as request id")
98 f.BoolVar(&cfg.buildInfoEnabled, "api.build-info-enabled", false, "If enabled, build Info API will be served by query frontend or querier.")
99 f.StringVar(&cfg.QuerierDefaultCodec, "api.querier-default-codec", "json", "Choose default codec for querier response serialization. Supports 'json' and 'protobuf'.")
100 cfg.RegisterFlagsWithPrefix("", f)
101}
102
103// RegisterFlagsWithPrefix adds the flags required to config this to the given FlagSet with the set prefix.
104func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {

Callers 2

runFunction · 0.95
TestConfig_RegisterFlagsFunction · 0.95

Calls 1

Tested by 2

runFunction · 0.76
TestConfig_RegisterFlagsFunction · 0.76