MCPcopy
hub / github.com/grafana/tempo / newEventuallyConsistentRing

Function newEventuallyConsistentRing

pkg/ring/ring.go:35–49  ·  view source on GitHub ↗
(cfg ring.Config, name, key string, reg prometheus.Registerer)

Source from the content-addressed store, hash-verified

33}
34
35func newEventuallyConsistentRing(cfg ring.Config, name, key string, reg prometheus.Registerer) (*ring.Ring, error) {
36 codec := ring.GetCodec()
37 // Suffix all client names with "-ring" to denote this kv client is used by the ring
38 store, err := kv.NewClient(
39 cfg.KVStore,
40 codec,
41 kv.RegistererWithKVName(reg, name+"-ring"),
42 log.Logger,
43 )
44 if err != nil {
45 return nil, err
46 }
47
48 return ring.NewWithStoreClientAndStrategy(cfg, name, key, store, &EventuallyConsistentStrategy{}, reg, log.Logger)
49}
50
51// EventuallyConsistentStrategy represents a repl strategy with a consistency of 1 on read and
52// write. Note this is NOT strongly consistent! It is _eventually_ consistent :)

Callers 1

NewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected