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

Function getPartitionRingFromStore

ring/partition_instance_lifecycler_test.go:410–415  ·  view source on GitHub ↗
(t *testing.T, store kv.Client, key string)

Source from the content-addressed store, hash-verified

408}
409
410func getPartitionRingFromStore(t *testing.T, store kv.Client, key string) *PartitionRingDesc {
411 in, err := store.Get(context.Background(), key)
412 require.NoError(t, err)
413
414 return GetOrCreatePartitionRingDesc(in)
415}
416
417func getPartitionStateFromStore(t *testing.T, store kv.Client, key string, partitionID int32) PartitionState {
418 partition, ok := getPartitionRingFromStore(t, store, key).GetPartitions()[partitionID]

Calls 2

GetMethod · 0.65

Tested by

no test coverage detected