Documentation
¶
Overview ¶
Package badgerstore implements the blob.Store interface using Badger.
Index ¶
- func Opener(_ context.Context, addr string) (blob.Store, error)
- type Store
- func (s *Store) Close() error
- func (s *Store) Delete(_ context.Context, key string) error
- func (s *Store) Get(_ context.Context, key string) (data []byte, err error)
- func (s *Store) Len(ctx context.Context) (int64, error)
- func (s *Store) List(ctx context.Context, start string, f func(string) error) error
- func (s *Store) Put(_ context.Context, opts blob.PutOptions) error
- func (s *Store) Size(_ context.Context, key string) (size int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements the blob.Store interface using a Badger key-value store.
func NewPath ¶
NewPath creates a Store by opening a Badger database with default options at the specified path.
func NewPathReadOnly ¶ added in v0.0.3
NewPathReadOnly creates a Store around a read-only Badger instance with default options at the specified path.
func (*Store) Close ¶
Close implements the io.Closer interface. It closes the underlying database instance and reports its result.
Click to show internal directories.
Click to hide internal directories.