Skip to content

Commit

Permalink
Merge pull request #122 from grafana/chore/arve/categorize-kv-params
Browse files Browse the repository at this point in the history
kv: Tag advanced config parameters
  • Loading branch information
aknuds1 committed Jan 31, 2022
2 parents 7436a77 + 8acfcb2 commit 37ca220
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion kv/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type StoreConfig struct {
// where store can be consul or inmemory.
type Config struct {
Store string `yaml:"store"`
Prefix string `yaml:"prefix"`
Prefix string `yaml:"prefix" category:"advanced"`
StoreConfig `yaml:",inline"`

Mock Client `yaml:"-"`
Expand Down
10 changes: 5 additions & 5 deletions kv/consul/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ var (
// Config to create a ConsulClient
type Config struct {
Host string `yaml:"host"`
ACLToken string `yaml:"acl_token"`
HTTPClientTimeout time.Duration `yaml:"http_client_timeout"`
ConsistentReads bool `yaml:"consistent_reads"`
WatchKeyRateLimit float64 `yaml:"watch_rate_limit"` // Zero disables rate limit
WatchKeyBurstSize int `yaml:"watch_burst_size"` // Burst when doing rate-limit, defaults to 1
ACLToken string `yaml:"acl_token" category:"advanced"`
HTTPClientTimeout time.Duration `yaml:"http_client_timeout" category:"advanced"`
ConsistentReads bool `yaml:"consistent_reads" category:"advanced"`
WatchKeyRateLimit float64 `yaml:"watch_rate_limit" category:"advanced"` // Zero disables rate limit
WatchKeyBurstSize int `yaml:"watch_burst_size" category:"advanced"` // Burst when doing rate-limit, defaults to 1

// Used in tests only.
MaxCasRetries int `yaml:"-"`
Expand Down
4 changes: 2 additions & 2 deletions kv/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
// Config for a new etcd.Client.
type Config struct {
Endpoints []string `yaml:"endpoints"`
DialTimeout time.Duration `yaml:"dial_timeout"`
MaxRetries int `yaml:"max_retries"`
DialTimeout time.Duration `yaml:"dial_timeout" category:"advanced"`
MaxRetries int `yaml:"max_retries" category:"advanced"`
EnableTLS bool `yaml:"tls_enabled"`
TLS dstls.ClientConfig `yaml:",inline"`

Expand Down
8 changes: 4 additions & 4 deletions kv/multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import (

// MultiConfig is a configuration for MultiClient.
type MultiConfig struct {
Primary string `yaml:"primary"`
Secondary string `yaml:"secondary"`
Primary string `yaml:"primary" category:"advanced"`
Secondary string `yaml:"secondary" category:"advanced"`

MirrorEnabled bool `yaml:"mirror_enabled"`
MirrorTimeout time.Duration `yaml:"mirror_timeout"`
MirrorEnabled bool `yaml:"mirror_enabled" category:"advanced"`
MirrorTimeout time.Duration `yaml:"mirror_timeout" category:"advanced"`

// ConfigProvider returns channel with MultiRuntimeConfig updates.
ConfigProvider func() <-chan MultiRuntimeConfig `yaml:"-"`
Expand Down

0 comments on commit 37ca220

Please sign in to comment.