Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("not found")
View Source
var ErrNotSupported = errors.New("not supported")
View Source
var ErrUnknownOp = errors.New("unknown op")
View Source
var Tombstone = []byte{0x00}
Functions ¶
This section is empty.
Types ¶
type ScanStore ¶
type ScanStore interface { Store Scan(ctx context.Context, start []byte, end []byte, limit int) ([]*KVPair, error) }
func NewBoltStore ¶
func NewRbMemoryStore ¶
func NewRbMemoryStore() ScanStore
type ScanTTLStore ¶
type ScanTTLTxn ¶
type Store ¶
type Store interface { Get(ctx context.Context, key []byte) ([]byte, error) Put(ctx context.Context, key []byte, value []byte) error Delete(ctx context.Context, key []byte) error Exists(ctx context.Context, key []byte) (bool, error) Snapshot() (io.ReadWriter, error) Restore(buf io.Reader) error Txn(ctx context.Context, f func(ctx context.Context, txn Txn) error) error Close() error }
func NewMemoryStore ¶
func NewMemoryStore() Store
type TTLStore ¶
type TTLStore interface { Store Expire(ctx context.Context, key []byte, ttl int64) error PutWithTTL(ctx context.Context, key []byte, value []byte, ttl int64) error TxnWithTTL(ctx context.Context, f func(ctx context.Context, txn TTLTxn) error) error }
func NewMemoryStoreDefaultTTL ¶
func NewMemoryStoreDefaultTTL() TTLStore
func NewRbMemoryStoreDefaultTTL ¶
func NewRbMemoryStoreDefaultTTL() TTLStore
Click to show internal directories.
Click to hide internal directories.