Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyNotFound = errors.New("KeyNotFound")
)
Functions ¶
This section is empty.
Types ¶
type SelectFn ¶
func WithPrefix ¶
type Store ¶
type Store interface { CreateCache(ctx context.Context, name string) error ListCaches(ctx context.Context) ([]string, error) DeleteCache(ctx context.Context, name string) error SetPruneIndex(ctx context.Context, name string, idx uint8) error GetPruneIndex(ctx context.Context, name string) (uint8, error) Prune(ctx context.Context, name, bucket string, pruneIndex uint8) error Clone(ctx context.Context, name, cname string) error WriteValue(ctx context.Context, name, bucket string, k []byte, v []byte, m byte) error DeleteValue(ctx context.Context, name, bucket string, k []byte) error DeletePrefix(ctx context.Context, name, bucket string, k []byte, fn ...SelectFn) error Txn(ctx context.Context, name, bucket string, txnOpts *TxnOpts) error GetValue(ctx context.Context, name, bucket string, k []byte) ([]byte, error) GetAll(ctx context.Context, name, bucket string, keysOnly bool, fn ...SelectFn) (chan *KV, error) GetPrefix(ctx context.Context, name, bucket string, prefix, pattern []byte, fn ...SelectFn) (chan *KV, error) // GetBatch(ctx context.Context, name, bucket string, keys [][]byte, fn ...SelectFn) (chan *KV, error) // GetN(ctx context.Context, name, bucket string, n uint64, fn ...SelectFn) ([]*KV, error) Watch(ctx context.Context, name, bucket string, prefixes [][]byte) (chan *KV, error) Close() error Clear(ctx context.Context, name string) error }
type StoreStats ¶
Click to show internal directories.
Click to hide internal directories.