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

Interface Codec

kv/codec/codec.go:9–16  ·  kv/codec/codec.go::Codec

Codec allows KV clients to serialise and deserialise values.

Source from the content-addressed store, hash-verified

7
8// Codec allows KV clients to serialise and deserialise values.
9type Codec interface {
10 Decode([]byte) (interface{}, error)
11 Encode(interface{}) ([]byte, error)
12
13 // CodecID is a short identifier to communicate what codec should be used to decode the value.
14 // Once in use, this should be stable to avoid confusing other clients.
15 CodecID() string
16}
17
18// Proto is a Codec for proto/snappy
19type Proto struct {

Callers 24

GetMultiWithErrorMethod · 0.65
DecodeMethod · 0.65
CASMethod · 0.65
WatchKeyMethod · 0.65
WatchPrefixMethod · 0.65
GetMethod · 0.65
casMethod · 0.65
SetAsyncMethod · 0.65
SetMultiAsyncMethod · 0.65
SetMethod · 0.65
AddMethod · 0.65

Implementers 5

stringCodeckv/client_test.go
Protokv/codec/codec.go
Stringkv/codec/codec.go
dataCodeckv/memberlist/memberlist_client_test.g
distributedCounterCodeckv/memberlist/memberlist_client_test.g

Calls

no outgoing calls

Tested by

no test coverage detected