Documentation ¶
Index ¶
- Variables
- func ChangeRegionInfo(store kv.Storage, regionID int, startKey, endKey []byte)
- func IsLocalStore(s kv.Storage) bool
- func MvccDecode(encodedKey kv.EncodedKey) (kv.Key, kv.Version, error)
- func MvccEncodeVersionKey(key kv.Key, ver kv.Version) kv.EncodedKey
- type Driver
- type LocalVersionProvider
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDBClosed is the error meaning db is closed and we can use it anymore. ErrDBClosed = errors.New("db is closed") )
ErrInvalidEncodedKey describes parsing an invalid format of EncodedKey.
ErrOverflow is the error returned by CurrentVersion, it describes if there're too many versions allocations in a very short period of time, ID may conflict.
var MockRemoteStore bool
MockRemoteStore mocks remote store. It makes IsLocalStore return false.
Functions ¶
func ChangeRegionInfo ¶
ChangeRegionInfo used for test handling region info change.
func IsLocalStore ¶
IsLocalStore checks whether a storage is local or not.
func MvccDecode ¶
MvccDecode parses the origin key and version of an encoded key, if the encoded key is a meta key, just returns the origin key.
Types ¶
type Driver ¶
type Driver struct { // engine.Driver is the engine driver for different local db engine. engine.Driver }
Driver implements kv.Driver interface.
type LocalVersionProvider ¶
type LocalVersionProvider struct {
// contains filtered or unexported fields
}
LocalVersionProvider uses local timestamp for version.
func (*LocalVersionProvider) CurrentVersion ¶
func (l *LocalVersionProvider) CurrentVersion() (kv.Version, error)
CurrentVersion implements the VersionProvider's GetCurrentVer interface.