Documentation
¶
Index ¶
- type RavelDatabase
- func (r *RavelDatabase) Close()
- func (r *RavelDatabase) Delete(key []byte) error
- func (r *RavelDatabase) Init(path string) error
- func (r *RavelDatabase) Read(key []byte) ([]byte, error)
- func (r *RavelDatabase) ReadAndDelete(key []byte) ([]byte, error)
- func (r *RavelDatabase) Write(key []byte, val []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RavelDatabase ¶
RavelDatabase represents an overlay on top of BadgerDB, it exposes Init, Close, Read, Write and Delete functions - these functions eventually perform mentioned operations on an instance of BadgerDB and these operations persist on disk
func (*RavelDatabase) Close ¶
func (r *RavelDatabase) Close()
Close closes the connection to the BadgerDB instance
func (*RavelDatabase) Delete ¶
func (r *RavelDatabase) Delete(key []byte) error
Delete deletes the key value pair with the corresponding key from BadgerDB
func (*RavelDatabase) Init ¶
func (r *RavelDatabase) Init(path string) error
Init initialises BadgerDB with the path provided.
func (*RavelDatabase) Read ¶
func (r *RavelDatabase) Read(key []byte) ([]byte, error)
Read returns the value with the corresponding key in the db
func (*RavelDatabase) ReadAndDelete ¶
func (r *RavelDatabase) ReadAndDelete(key []byte) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.