Documentation ¶
Index ¶
- Variables
- type MemDatabase
- func (db *MemDatabase) Close()
- func (db *MemDatabase) Copy() *MemDatabase
- func (db *MemDatabase) Delete(key []byte) error
- func (db *MemDatabase) Get(key []byte) ([]byte, error)
- func (db *MemDatabase) Has(key []byte) (bool, error)
- func (db *MemDatabase) Keys() [][]byte
- func (db *MemDatabase) Len() int
- func (db *MemDatabase) NewBatch() fdb.Batch
- func (db *MemDatabase) Put(key []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("memdb: not found")
)
Functions ¶
This section is empty.
Types ¶
type MemDatabase ¶
type MemDatabase struct {
// contains filtered or unexported fields
}
* This is a test memory database. Do not use for any production it does not get persisted
func NewMemDatabase ¶
func NewMemDatabase() *MemDatabase
func NewMemDatabaseWithCap ¶
func NewMemDatabaseWithCap(size int) *MemDatabase
func (*MemDatabase) Close ¶
func (db *MemDatabase) Close()
func (*MemDatabase) Copy ¶
func (db *MemDatabase) Copy() *MemDatabase
func (*MemDatabase) Delete ¶
func (db *MemDatabase) Delete(key []byte) error
func (*MemDatabase) Keys ¶
func (db *MemDatabase) Keys() [][]byte
func (*MemDatabase) Len ¶
func (db *MemDatabase) Len() int
func (*MemDatabase) NewBatch ¶
func (db *MemDatabase) NewBatch() fdb.Batch
Click to show internal directories.
Click to hide internal directories.