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

Function keyValuePair

kv/memberlist/memberlist_client_test.go:2011–2017  ·  view source on GitHub ↗
(t *testing.T, key string, codec codec.Codec, value interface{})

Source from the content-addressed store, hash-verified

2009}
2010
2011func keyValuePair(t *testing.T, key string, codec codec.Codec, value interface{}) *KeyValuePair {
2012 data, err := codec.Encode(value)
2013 require.NoError(t, err)
2014
2015 return &KeyValuePair{Key: key, Codec: codec.CodecID(), Value: data}
2016
2017}
2018
2019func marshalKeyValuePair(t *testing.T, key string, codec codec.Codec, value interface{}) []byte {
2020 kvp := keyValuePair(t, key, codec, value)

Calls 2

EncodeMethod · 0.65
CodecIDMethod · 0.65

Tested by

no test coverage detected