(prefix string, f *flag.FlagSet)
| 25 | } |
| 26 | |
| 27 | func (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 | |
| 38 | func (cfg *Config) PathMatches(other *Config) bool { |
| 39 | return cfg.StorageAccountName == other.StorageAccountName && cfg.ContainerName == other.ContainerName && cfg.Prefix == other.Prefix |
nothing calls this directly
no test coverage detected