Codec allows KV clients to serialise and deserialise values.
| 7 | |
| 8 | // Codec allows KV clients to serialise and deserialise values. |
| 9 | type 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 |
| 19 | type Proto struct { |
no outgoing calls
no test coverage detected