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

Method getRing

ring/partition_instance_lifecycler.go:246–253  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

244}
245
246func (l *PartitionInstanceLifecycler) getRing(ctx context.Context) (*PartitionRingDesc, error) {
247 in, err := l.store.Get(ctx, l.ringKey)
248 if err != nil {
249 return nil, err
250 }
251
252 return GetOrCreatePartitionRingDesc(in), nil
253}
254
255func (l *PartitionInstanceLifecycler) updateRing(ctx context.Context, update func(ring *PartitionRingDesc) (bool, error)) error {
256 return l.store.CAS(ctx, l.ringKey, func(in interface{}) (out interface{}, retry bool, err error) {

Callers 2

GetPartitionStateMethod · 0.95

Calls 2

GetMethod · 0.65

Tested by

no test coverage detected