Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kv: Tag advanced config parameters #122

Merged
merged 2 commits into from
Jan 31, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kv/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ type StoreConfig struct {
// Config is config for a KVStore currently used by ring and HA tracker,
// where store can be consul or inmemory.
type Config struct {
Store string `yaml:"store"`
Prefix string `yaml:"prefix"`
Store string `yaml:"store" category:"advanced"`
aknuds1 marked this conversation as resolved.
Show resolved Hide resolved
Prefix string `yaml:"prefix" category:"advanced"`
StoreConfig `yaml:",inline"`

Mock Client `yaml:"-"`
Expand Down
12 changes: 6 additions & 6 deletions kv/consul/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ 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
Host string `yaml:"host" category:"advanced"`
aknuds1 marked this conversation as resolved.
Show resolved Hide resolved
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
10 changes: 5 additions & 5 deletions kv/etcd/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ 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"`
Endpoints []string `yaml:"endpoints" category:"advanced"`
aknuds1 marked this conversation as resolved.
Show resolved Hide resolved
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"`

UserName string `yaml:"username"`
Password string `yaml:"password"`
UserName string `yaml:"username" category:"advanced"`
aknuds1 marked this conversation as resolved.
Show resolved Hide resolved
Password string `yaml:"password" category:"advanced"`
aknuds1 marked this conversation as resolved.
Show resolved Hide resolved
}

// Clientv3Facade is a subset of all Etcd client operations that are required
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