Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clonable ¶ added in v1.15.0
type Clonable interface {
// Clone should return a deep copy of the state.
Clone() interface{}
}
type Codec ¶
type Codec interface { Decode([]byte) (interface{}, error) Encode(interface{}) ([]byte, error) DecodeMultiKey(map[string][]byte) (interface{}, error) EncodeMultiKey(interface{}) (map[string][]byte, error) // CodecID is a short identifier to communicate what codec should be used to decode the value. // Once in use, this should be stable to avoid confusing other clients. CodecID() string }
Codec allows KV clients to serialise and deserialise values.
type MultiKey ¶ added in v1.15.0
type MultiKey interface { Clonable // SplitByID Split interface in array of key and value. THe key is a unique identifier of an instance in the ring. The value is // interface with its data. The interface resultant need to be a proto.Message SplitByID() map[string]interface{} // JoinIds update the current interface to add receiving key value information. The key is an unique identifier for an instance. // The value is the information for that instance. JoinIds(in map[string]interface{}) // GetItemFactory method to be used for deserilaize the value information from an instance GetItemFactory() proto.Message // FindDifference returns the difference between two Multikeys. The returns are an interface which also implements Multikey // with an array of keys which were changed, and an array of strings which are unique identifiers deleted. An error is // returned when that does not implement the correct codec FindDifference(that MultiKey) (interface{}, []string, error) }
type Proto ¶
type Proto struct {
// contains filtered or unexported fields
}
Proto is a Codec for proto/snappy
func NewProtoCodec ¶ added in v0.7.0
func (Proto) DecodeMultiKey ¶ added in v1.15.0
DecodeMultiKey implements Codec
Click to show internal directories.
Click to hide internal directories.