Versions in this module Expand all Collapse all v0 v0.0.2 Nov 23, 2024 Changes in this version + type DB struct + func (db *DB) AppendHook(prefix []byte, fn HookHandler) error + func (db *DB) Delete(k []byte) error + func (db *DB) Get(k []byte) ([]byte, error) + func (db *DB) Put(k []byte, v []byte) error + func (db *DB) Query(ctx context.Context, k []byte, opts ...QueryOption) iter.Seq2[[]byte, error] + func (db *DB) RemoveHook(prefix []byte) error + func (db *DB) Subscribe(ctx context.Context, prefix []byte, opts ...SubscribeOption) (<-chan []byte, error) + type SubscribeOption func(*SubscribeOptions) error + func WithBufSize(size int) SubscribeOption + func WithOnceSubscription() SubscribeOption + type SubscribeOptions struct + BufSize *int + Once bool v0.0.1 Nov 11, 2024 Changes in this version + var ErrClosedTransaction = errors.New("transaction is closed") + var ErrDeleted = errors.New("deleted") + var ErrEmptyEntry = errors.New("entry(i,k) cannot be empty") + var ErrKeyNotFound = errors.New("key not found") + type HookDB interface + Transaction func() Transaction + TransactionWithLock func() Transaction + func New() HookDB + type HookHandler func(k, v []byte) (removeHook bool) + type QueryOption func(*QueryOptions) + func WithReverseQuery() QueryOption + type QueryOptions struct + Reverse bool + type Transaction interface + Commit func() error + Rollback func() error