Documentation ¶
Index ¶
Constants ¶
const LockVer = math.MaxUint64
Variables ¶
var ( // ErrInvalidEncodedKey describes parsing an invalid format of EncodedKey. ErrInvalidEncodedKey = errors.New("invalid encoded key") )
Functions ¶
Types ¶
type Key ¶
type Key []byte
Key is the encoded key type with timestamp.
type Lock ¶
func (*Lock) LockErr ¶
LockErr returns LockedError. Note that parameter key is raw key, while key in LockedError is mvcc key.
func (*Lock) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler interface.
func (*Lock) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler interface.
type LockDecoder ¶
LockDecoder is used to decode Lock entry of low-level key-value store.
type LockedError ¶
LockedError is returned when trying to Read/Write on a locked key. Caller should backoff or cleanup the lock then retry.
func (*LockedError) Error ¶
func (e *LockedError) Error() string
Error formats the lock to a string.
type SkipDecoder ¶
type SkipDecoder struct {
CurrKey []byte
}
SkipDecoder is used to decode useless versions of value entry.
type Value ¶
func (*Value) MarshalBinary ¶
MarshalBinary implements encoding.BinaryMarshaler interface.
func (*Value) UnmarshalBinary ¶
UnmarshalBinary implements encoding.BinaryUnmarshaler interface.
type ValueDecoder ¶
ValueDecoder is used to decode the value entries. There will be multiple versions of specified key.