Documentation
¶
Index ¶
- type IdHash
- type LDBDatabase
- func (ldb *LDBDatabase) Close()
- func (ldb *LDBDatabase) Delete(key []byte) error
- func (ldb *LDBDatabase) Get(key []byte) ([]byte, error)
- func (ldb *LDBDatabase) GetHashId(hash []byte) (common.Hash, error)
- func (ldb *LDBDatabase) GetTxId(w http.ResponseWriter, r *http.Request)
- func (ldb *LDBDatabase) Has(key []byte) (bool, error)
- func (ldb *LDBDatabase) InsertHash(hash []byte, id common.Hash) error
- func (ldb *LDBDatabase) LDB() *leveldb.DB
- func (ldb *LDBDatabase) NewIterator() iterator.Iterator
- func (ldb *LDBDatabase) NewIteratorWithPrefix(prefix []byte) iterator.Iterator
- func (ldb *LDBDatabase) Path() string
- func (ldb *LDBDatabase) Put(key []byte, value []byte) error
- type RequestParm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LDBDatabase ¶
type LDBDatabase struct {
// contains filtered or unexported fields
}
func NewLDBDatabase ¶
func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error)
NewLDBDatabase returns a LevelDB wrapped object.
func (*LDBDatabase) Close ¶
func (ldb *LDBDatabase) Close()
func (*LDBDatabase) Delete ¶
func (ldb *LDBDatabase) Delete(key []byte) error
Delete deletes the key from the queue and database
func (*LDBDatabase) Get ¶
func (ldb *LDBDatabase) Get(key []byte) ([]byte, error)
Get returns the given key if it's present.
func (*LDBDatabase) GetTxId ¶
func (ldb *LDBDatabase) GetTxId(w http.ResponseWriter, r *http.Request)
func (*LDBDatabase) InsertHash ¶
func (ldb *LDBDatabase) InsertHash(hash []byte, id common.Hash) error
func (*LDBDatabase) LDB ¶
func (ldb *LDBDatabase) LDB() *leveldb.DB
func (*LDBDatabase) NewIterator ¶
func (ldb *LDBDatabase) NewIterator() iterator.Iterator
func (*LDBDatabase) NewIteratorWithPrefix ¶
func (ldb *LDBDatabase) NewIteratorWithPrefix(prefix []byte) iterator.Iterator
NewIteratorWithPrefix returns a iterator to iterate over subset of database content with a particular prefix.
func (*LDBDatabase) Path ¶
func (ldb *LDBDatabase) Path() string
Path returns the path to the database directory.
type RequestParm ¶
type RequestParm struct {
Hash string
}
Click to show internal directories.
Click to hide internal directories.