package
2.4.4+incompatible
Repository: https://github.com/laincloud/lainlet.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
CreateEndpoints creates a list of endpoints given the right scheme.
New return a new store by given name and initialize addrs.
Normalize the key for each store to the form:
/path/to/key
.
Register a new store, the Intializer is a function used to initialize store.
SplitKey splits the key to extract path informations.
# Constants
DELETE event action, return when some key was delete or expired or compareAndDelete.
ERROR event action, this will be set when geting error from backend(etcd, zk...).
GET event action, useless.
INIT event action, this is only retured when calling watch() and only the first correct event.
SET event action, same with update, it's useless.
UPDATE event action, return when data changed in backend, include set, create, update, compareAndSwap.
# Variables
ErrBackendNotSupported is thrown when the backend k/v store is not supported by libkv.
ErrCallNotSupported is thrown when a method is not implemented/supported by the current backend.
ErrCannotLock is thrown when there is an error acquiring a lock on a key.
ErrKeyExists is thrown when the previous value exists in the case of an AtomicPut.
ErrKeyModified is thrown during an atomic operation if the index does not match the one in the store.
ErrKeyNotFound is thrown when the key is not found in the store during a Get operation.
ErrNotReachable is thrown when the API cannot be reached for issuing common store operations.
ErrPreviousNotSpecified is thrown when the previous value is not specified for an atomic operation.
# Interfaces
Store represents the backend K/V storage Each store should support every call listed here.
# Type aliases
Action is the event type.
Initializer is initialization function which can create real store, used when Register().