RegisterFlags adds the flags required to config this to the given FlagSet.
(f *flag.FlagSet)
| 92 | |
| 93 | // RegisterFlags adds the flags required to config this to the given FlagSet. |
| 94 | func (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. |
| 104 | func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { |