 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- type Database
- func (db *Database) Close() error
- func (db *Database) Compact(_, _ []byte) error
- func (db *Database) Delete(key []byte) error
- func (db *Database) Get(key []byte) ([]byte, error)
- func (db *Database) Has(key []byte) (bool, error)
- func (db *Database) HealthCheck(context.Context) (interface{}, error)
- func (db *Database) NewBatch() database.Batch
- func (db *Database) NewIterator() database.Iterator
- func (db *Database) NewIteratorWithPrefix(prefix []byte) database.Iterator
- func (db *Database) NewIteratorWithStart(start []byte) database.Iterator
- func (db *Database) NewIteratorWithStartAndPrefix(start, prefix []byte) database.Iterator
- func (db *Database) Put(key []byte, value []byte) error
 
Constants ¶
      View Source
      
  
const ( // Name is the name of this database for database switches Name = "memdb" // DefaultSize is the default initial size of the memory database DefaultSize = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
	// contains filtered or unexported fields
}
    Database is an ephemeral key-value store that implements the Database interface.
func NewWithSize ¶
NewWithSize returns a map pre-allocated to the provided size with the Database interface methods implemented.
func (*Database) HealthCheck ¶ added in v1.7.13
func (*Database) NewIterator ¶
func (*Database) NewIteratorWithPrefix ¶
func (*Database) NewIteratorWithStart ¶
func (*Database) NewIteratorWithStartAndPrefix ¶
 Click to show internal directories. 
   Click to hide internal directories.