Documentation ¶
Index ¶
- type Iterator
- type Option
- type Store
- func (s *Store) Close() error
- func (s *Store) Delete(ctx context.Context, key []byte) error
- func (s *Store) Get(ctx context.Context, key []byte) ([]byte, error)
- func (s *Store) NewIterator(opts ...kv.IteratorOption) (kv.Iterator, error)
- func (s *Store) NewTransaction() (kv.Transaction, error)
- func (s *Store) Put(ctx context.Context, key []byte, val []byte) error
- func (s *Store) PutWithTTL(ctx context.Context, key []byte, val []byte, ttl time.Duration) error
- type Transaction
- func (txn *Transaction) Commit(ctx context.Context) error
- func (txn *Transaction) Delete(ctx context.Context, key []byte) error
- func (txn *Transaction) Get(ctx context.Context, key []byte) ([]byte, error)
- func (txn *Transaction) Put(ctx context.Context, key []byte, val []byte) error
- func (txn *Transaction) Rollback() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithLogger ¶
func WithLogger(logger badger.Logger) Option
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func New ¶
New creates a new Store instance. path is a directory path where the database files will be stored.
func (*Store) NewIterator ¶
func (*Store) NewTransaction ¶
func (s *Store) NewTransaction() (kv.Transaction, error)
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Rollback ¶
func (txn *Transaction) Rollback() error
Click to show internal directories.
Click to hide internal directories.