MCPcopy
hub / github.com/grafana/tempo / RegisterFlagsAndApplyDefaults

Method RegisterFlagsAndApplyDefaults

tempodb/backend/azure/config.go:27–36  ·  view source on GitHub ↗
(prefix string, f *flag.FlagSet)

Source from the content-addressed store, hash-verified

25}
26
27func (cfg *Config) RegisterFlagsAndApplyDefaults(prefix string, f *flag.FlagSet) {
28 f.StringVar(&cfg.StorageAccountName, util.PrefixConfig(prefix, "azure.storage_account_name"), "", "Azure storage account name.")
29 f.Var(&cfg.StorageAccountKey, util.PrefixConfig(prefix, "azure.storage_account_key"), "Azure storage access key.")
30 f.StringVar(&cfg.ContainerName, util.PrefixConfig(prefix, "azure.container_name"), "", "Azure container name to store blocks in.")
31 f.StringVar(&cfg.Prefix, util.PrefixConfig(prefix, "azure.prefix"), "", "Azure container prefix to store blocks in.")
32 f.StringVar(&cfg.Endpoint, util.PrefixConfig(prefix, "azure.endpoint"), "blob.core.windows.net", "Azure endpoint to push blocks to.")
33 f.IntVar(&cfg.MaxBuffers, util.PrefixConfig(prefix, "azure.max_buffers"), 4, "Number of simultaneous uploads.")
34 cfg.BufferSize = 3 * 1024 * 1024
35 cfg.HedgeRequestsUpTo = 2
36}
37
38func (cfg *Config) PathMatches(other *Config) bool {
39 return cfg.StorageAccountName == other.StorageAccountName && cfg.ContainerName == other.ContainerName && cfg.Prefix == other.Prefix

Callers

nothing calls this directly

Calls 1

PrefixConfigFunction · 0.92

Tested by

no test coverage detected