MCPcopy Create free account
hub / github.com/cortexproject/cortex / getInstanceFromStore

Function getInstanceFromStore

pkg/ring/basic_lifecycler_test.go:495–507  ·  view source on GitHub ↗
(t *testing.T, store kv.Client, instanceID string)

Source from the content-addressed store, hash-verified

493}
494
495func getInstanceFromStore(t *testing.T, store kv.Client, instanceID string) (InstanceDesc, bool) {
496 out, err := store.Get(context.Background(), testRingKey)
497 require.NoError(t, err)
498
499 if out == nil {
500 return InstanceDesc{}, false
501 }
502
503 ringDesc := out.(*Desc)
504 instanceDesc, ok := ringDesc.GetIngesters()[instanceID]
505
506 return instanceDesc, ok
507}

Calls 2

GetIngestersMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected