Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ValueStruct ¶
type ValueStruct struct {
Meta byte
UserMeta byte
ExpiresAt uint64
Value []byte
Version uint64 // This field is not serialized. Only for internal usage.
}
ValueStruct represents the value info that can be associated with a key, but also the internal Meta field.
func (*ValueStruct) Decode ¶
func (v *ValueStruct) Decode(b []byte)
Decode uses the length of the slice to infer the length of the Value field.
func (*ValueStruct) Encode ¶
func (v *ValueStruct) Encode(b []byte)
Encode expects a slice of length at least v.EncodedSize().
func (*ValueStruct) EncodeTo ¶
func (v *ValueStruct) EncodeTo(buf *bytes.Buffer)
EncodeTo should be kept in sync with the Encode function above. The reason this function exists is to avoid creating byte arrays per key-value pair in btable/builder.go.
func (*ValueStruct) EncodedSize ¶
func (v *ValueStruct) EncodedSize() uint16
EncodedSize is the size of the ValueStruct when encoded
Click to show internal directories.
Click to hide internal directories.