Documentation ¶
Index ¶
- Variables
- type Batch
- type Database
- type LDBDatabase
- func (self *LDBDatabase) Close()
- func (self *LDBDatabase) Delete(key []byte) error
- func (self *LDBDatabase) Get(key []byte) ([]byte, error)
- func (self *LDBDatabase) LDB() *leveldb.DB
- func (self *LDBDatabase) Meter(prefix string)
- func (db *LDBDatabase) NewBatch() Batch
- func (self *LDBDatabase) NewIterator() iterator.Iterator
- func (self *LDBDatabase) Put(key []byte, value []byte) error
- type MemDatabase
- func (db *MemDatabase) Close()
- func (db *MemDatabase) Delete(key []byte) error
- func (db *MemDatabase) Get(key []byte) ([]byte, error)
- func (db *MemDatabase) Keys() [][]byte
- func (db *MemDatabase) LastKnownTD() []byte
- func (db *MemDatabase) NewBatch() Batch
- func (db *MemDatabase) Print()
- func (db *MemDatabase) Put(key []byte, value []byte) error
- func (db *MemDatabase) Set(key []byte, value []byte)
Constants ¶
This section is empty.
Variables ¶
View Source
var OpenFileLimit = 64
Functions ¶
This section is empty.
Types ¶
type LDBDatabase ¶ added in v0.9.39
type LDBDatabase struct {
// contains filtered or unexported fields
}
func NewLDBDatabase ¶ added in v0.9.39
func NewLDBDatabase(file string, cache int) (*LDBDatabase, error)
NewLDBDatabase returns a LevelDB wrapped object.
func (*LDBDatabase) Close ¶ added in v0.9.39
func (self *LDBDatabase) Close()
func (*LDBDatabase) Delete ¶ added in v0.9.39
func (self *LDBDatabase) Delete(key []byte) error
Delete deletes the key from the queue and database
func (*LDBDatabase) Get ¶ added in v0.9.39
func (self *LDBDatabase) Get(key []byte) ([]byte, error)
Get returns the given key if it's present.
func (*LDBDatabase) LDB ¶ added in v0.9.39
func (self *LDBDatabase) LDB() *leveldb.DB
func (*LDBDatabase) Meter ¶ added in v0.9.39
func (self *LDBDatabase) Meter(prefix string)
Meter configures the database metrics collectors and
func (*LDBDatabase) NewBatch ¶ added in v1.2.2
func (db *LDBDatabase) NewBatch() Batch
func (*LDBDatabase) NewIterator ¶ added in v0.9.39
func (self *LDBDatabase) NewIterator() iterator.Iterator
type MemDatabase ¶ added in v0.9.39
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 ¶ added in v0.9.39
func NewMemDatabase() (*MemDatabase, error)
func (*MemDatabase) Close ¶ added in v0.9.39
func (db *MemDatabase) Close()
func (*MemDatabase) Delete ¶ added in v0.9.39
func (db *MemDatabase) Delete(key []byte) error
func (*MemDatabase) Keys ¶ added in v1.2.2
func (db *MemDatabase) Keys() [][]byte
func (*MemDatabase) LastKnownTD ¶ added in v0.9.39
func (db *MemDatabase) LastKnownTD() []byte
func (*MemDatabase) NewBatch ¶ added in v1.2.2
func (db *MemDatabase) NewBatch() Batch
func (*MemDatabase) Print ¶ added in v0.9.39
func (db *MemDatabase) Print()
func (*MemDatabase) Put ¶ added in v0.9.39
func (db *MemDatabase) Put(key []byte, value []byte) error
func (*MemDatabase) Set ¶ added in v0.9.39
func (db *MemDatabase) Set(key []byte, value []byte)
Click to show internal directories.
Click to hide internal directories.