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

Function getData

kv/memberlist/memberlist_client_test.go:216–227  ·  view source on GitHub ↗
(t *testing.T, kv *Client, key string)

Source from the content-addressed store, hash-verified

214}
215
216func getData(t *testing.T, kv *Client, key string) *data {
217 t.Helper()
218 val := get(t, kv, key)
219 if val == nil {
220 return nil
221 }
222 if r, ok := val.(*data); ok {
223 return r
224 }
225 t.Fatalf("Expected ring, got: %T", val)
226 return nil
227}
228
229func cas(kv *Client, key string, updateFn func(*data) (*data, bool, error)) error {
230 return casWithErr(context.Background(), kv, key, updateFn)

Calls 3

getFunction · 0.85
HelperMethod · 0.80
FatalfMethod · 0.80

Tested by

no test coverage detected