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

Function marshalState

kv/memberlist/memberlist_client_test.go:2236–2248  ·  view source on GitHub ↗
(t *testing.T, kvps ...*KeyValuePair)

Source from the content-addressed store, hash-verified

2234}
2235
2236func marshalState(t *testing.T, kvps ...*KeyValuePair) []byte {
2237 buf := bytes.Buffer{}
2238
2239 for _, kvp := range kvps {
2240 d, err := kvp.Marshal()
2241 require.NoError(t, err)
2242 err = binary.Write(&buf, binary.BigEndian, uint32(len(d)))
2243 require.NoError(t, err)
2244 buf.Write(d)
2245 }
2246
2247 return buf.Bytes()
2248}
2249
2250func TestNotificationDelay(t *testing.T) {
2251 var cfg KVConfig

Calls 2

MarshalMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected