filestore

package
v2.7.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 7 Imported by: 0

README

filestore

This package provides the ability to read legacy meta.db files by meta.Client

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVStore

type KVStore struct {
	// contains filtered or unexported fields
}

func New

func New(path, bucketName, keyName string) *KVStore

func (*KVStore) Backup

func (s *KVStore) Backup(ctx context.Context, w io.Writer) error

func (*KVStore) Cursor

func (s *KVStore) Cursor(hints ...kv.CursorHint) (kv.Cursor, error)

func (*KVStore) Delete

func (s *KVStore) Delete(key []byte) error

func (*KVStore) ForwardCursor

func (s *KVStore) ForwardCursor(seek []byte, opts ...kv.CursorOption) (kv.ForwardCursor, error)

func (*KVStore) Get

func (s *KVStore) Get(key []byte) ([]byte, error)

func (*KVStore) GetBatch

func (s *KVStore) GetBatch(keys ...[]byte) (values [][]byte, err error)

func (*KVStore) Put

func (s *KVStore) Put(key, value []byte) error

func (*KVStore) RLock added in v2.1.0

func (s *KVStore) RLock()

func (*KVStore) RUnlock added in v2.1.0

func (s *KVStore) RUnlock()

func (*KVStore) Restore

func (s *KVStore) Restore(ctx context.Context, r io.Reader) error

func (*KVStore) Update

func (s *KVStore) Update(ctx context.Context, f func(kv.Tx) error) error

func (*KVStore) View

func (s *KVStore) View(ctx context.Context, f func(kv.Tx) error) error

type Tx

type Tx struct {
	// contains filtered or unexported fields
}

Tx is an in memory transaction. TODO: make transactions actually transactional

func (*Tx) Bucket

func (t *Tx) Bucket(b []byte) (kv.Bucket, error)

func (*Tx) Context

func (t *Tx) Context() context.Context

func (*Tx) WithContext

func (t *Tx) WithContext(ctx context.Context)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL