Documentation
¶
Index ¶
- type Database
- func (d *Database) Close() error
- func (d *Database) Compact(start, limit []byte) error
- func (d *Database) Delete(key []byte) error
- func (d *Database) Get(key []byte) ([]byte, error)
- func (d *Database) Has(key []byte) (bool, error)
- func (d *Database) HealthCheck() error
- func (d *Database) NewBatch() db.Batch
- func (d *Database) NewIterator() db.Iterator
- func (d *Database) NewIteratorWithPrefix(prefix []byte) db.Iterator
- func (d *Database) NewIteratorWithStart(start []byte) db.Iterator
- func (d *Database) NewIteratorWithStartAndPrefix(start, prefix []byte) db.Iterator
- func (d *Database) Put(key []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
Database is a badgerdb backed database
func New ¶
func New(file string, configBytes []byte, namespace string, metrics prometheus.Registerer) (*Database, error)
New returns a new badgerdb-backed database
func (*Database) HealthCheck ¶
HealthCheck returns nil if the database is healthy, non-nil otherwise.
func (*Database) NewIterator ¶
NewIterator implements the Database interface
func (*Database) NewIteratorWithPrefix ¶
NewIteratorWithPrefix implements the Database interface
func (*Database) NewIteratorWithStart ¶
NewIteratorWithStart implements the Database interface
func (*Database) NewIteratorWithStartAndPrefix ¶
NewIteratorWithStartAndPrefix implements the Database interface
Click to show internal directories.
Click to hide internal directories.