MCPcopy
hub / github.com/grafana/dskit / Config

Struct Config

kv/consul/client.go:43–54  ·  view source on GitHub ↗

Config to create a ConsulClient

Source from the content-addressed store, hash-verified

41
42// Config to create a ConsulClient
43type Config struct {
44 Host string `yaml:"host"`
45 ACLToken flagext.Secret `yaml:"acl_token" category:"advanced"`
46 HTTPClientTimeout time.Duration `yaml:"http_client_timeout" category:"advanced"`
47 ConsistentReads bool `yaml:"consistent_reads" category:"advanced"`
48 WatchKeyRateLimit float64 `yaml:"watch_rate_limit" category:"advanced"` // Zero disables rate limit
49 WatchKeyBurstSize int `yaml:"watch_burst_size" category:"advanced"` // Burst when doing rate-limit, defaults to 1
50 CasRetryDelay time.Duration `yaml:"cas_retry_delay" category:"advanced"`
51
52 // Used in tests only.
53 MaxCasRetries int `yaml:"-"`
54}
55
56type kv interface {
57 CAS(p *consul.KVPair, q *consul.WriteOptions) (bool, *consul.WriteMeta, error)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected