Documentation ¶
Overview ¶
Package bitcaskstore implements the blob.StoreCloser interface on a bitcask database.
Index ¶
- func Opener(_ context.Context, addr string) (blob.StoreCloser, error)
- type KV
- func (s KV) Close(_ context.Context) error
- func (s KV) Delete(ctx context.Context, key string) error
- func (s KV) Get(ctx context.Context, key string) ([]byte, error)
- func (s KV) Has(ctx context.Context, keys ...string) (blob.KeySet, error)
- func (s KV) Len(ctx context.Context) (n int64, err error)
- func (s KV) List(ctx context.Context, start string) iter.Seq2[string, error]
- func (s KV) Put(ctx context.Context, opts blob.PutOptions) error
- type Options
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KV ¶
type KV struct {
// contains filtered or unexported fields
}
KV implements the blob.KV interface on a bitcask database.
func (KV) Close ¶
Close implements part of the blob.KV interface. It syncs and closes all of the data files in use by the database.
func (KV) Put ¶
Put implements part of blob.KV. The bitcask implementation does not accept empty keys, so Put will report blob.ErrKeyNotFound for that case.
type Options ¶
type Options struct { // KeyPrefix, if set, restricts access to keys beginning with this prefix. KeyPrefix string }
Options are configurations for a KV or a Store. A nil *Options is ready for use and provides default values as described.
type Store ¶
Store implements the blob.StoreCloser interface using a Bitcask database.
Click to show internal directories.
Click to hide internal directories.