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

Function defaultKVConfig

kv/memberlist/memberlist_client_test.go:681–698  ·  view source on GitHub ↗
(i int)

Source from the content-addressed store, hash-verified

679}
680
681func defaultKVConfig(i int) KVConfig {
682 id := fmt.Sprintf("Member-%d", i)
683 var cfg KVConfig
684 flagext.DefaultValues(&cfg)
685 cfg.NodeName = id
686
687 cfg.GossipInterval = 100 * time.Millisecond
688 cfg.GossipNodes = 10
689 cfg.PushPullInterval = 5 * time.Second
690 cfg.ObsoleteEntriesTimeout = 5 * time.Second
691
692 cfg.TCPTransport = TCPTransportConfig{
693 BindAddrs: getLocalhostAddrs(),
694 BindPort: 0, // randomize ports
695 }
696
697 return cfg
698}
699
700func TestDelete(t *testing.T) {
701 t.Parallel()

Calls 2

DefaultValuesFunction · 0.92
getLocalhostAddrsFunction · 0.85

Tested by

no test coverage detected