Documentation ¶
Index ¶
- Variables
- type BaseDB
- type BaseDBOptions
- type BaseOptions
- type CachedValue
- type FilePath
- type FileTreeDB
- func (f *FileTreeDB) Close()
- func (f *FileTreeDB) Del(key []uint8)
- func (f *FileTreeDB) Drop()
- func (f *FileTreeDB) Empty()
- func (f *FileTreeDB) Get(key []uint8) []uint8
- func (f *FileTreeDB) Maintain(fn *ProgressCB) error
- func (f *FileTreeDB) Open()
- func (f *FileTreeDB) Put(key, value []uint8)
- func (f *FileTreeDB) Rename(base, file string)
- func (f *FileTreeDB) Size() int
- type KV
- type LruDB
- func (l *LruDB) Close()
- func (l *LruDB) Del(key []uint8)
- func (l *LruDB) Drop()
- func (l *LruDB) Empty()
- func (l *LruDB) Get(key []uint8) []uint8
- func (l *LruDB) Maintain(fn *ProgressCB) error
- func (l *LruDB) Open()
- func (l *LruDB) Put(key, value []uint8)
- func (l *LruDB) Rename(base, file string)
- func (l *LruDB) Size() int
- type LruMap
- type MemoryDB
- func (m *MemoryDB) Close()
- func (m *MemoryDB) Del(key []uint8)
- func (m *MemoryDB) Drop()
- func (m *MemoryDB) Empty()
- func (m *MemoryDB) Get(key []uint8) []uint8
- func (m *MemoryDB) Maintain(fn *ProgressCB) error
- func (m *MemoryDB) Open()
- func (m *MemoryDB) Put(key []uint8, value []uint8)
- func (m *MemoryDB) Rename(base, file string)
- func (m *MemoryDB) Size() int
- type Overlay
- type ProgressCB
- type ProgressValue
- type Storage
- type TXDB
- type TransactionDB
- func (t *TransactionDB) Close()
- func (t *TransactionDB) CommitTx() error
- func (t *TransactionDB) CreateTx() error
- func (t *TransactionDB) Del(key []uint8)
- func (t *TransactionDB) Drop()
- func (t *TransactionDB) Empty()
- func (t *TransactionDB) Get(key []uint8) []uint8
- func (t *TransactionDB) Maintain(fn *ProgressCB) error
- func (t *TransactionDB) Open()
- func (t *TransactionDB) Put(key, value []uint8)
- func (t *TransactionDB) Rename(base, file string)
- func (t *TransactionDB) RevertTx() error
- func (t *TransactionDB) Size() int
- func (t *TransactionDB) Transaction(fn func() bool) (bool, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultPath = "~/.golkadot"
DefaultPath ...
View Source
var DefaultType = "disk"
DefaultType ...
Functions ¶
This section is empty.
Types ¶
type BaseDB ¶
type BaseDB interface { Close() Open() Drop() Empty() Maintain(fn *ProgressCB) error Rename(base, file string) Size() int Del(key []uint8) Get(key []uint8) []uint8 Put(key, value []uint8) }
BaseDB ...
type FileTreeDB ¶
type FileTreeDB struct {
// contains filtered or unexported fields
}
FileTreeDB ...
type LruDB ¶
type LruDB struct {
// contains filtered or unexported fields
}
LruDB ...
type MemoryDB ¶
type MemoryDB struct {
// contains filtered or unexported fields
}
MemoryDB ...
func NewMemoryDB ¶
func NewMemoryDB(options *BaseOptions) *MemoryDB
NewMemoryDB creates a MemoryDB database extending TransactionDB options argument (optional) used to specifies whether to use compression. - Enable compression when storing "blocks" since they compress well. - Disable compression when storing "state" Transactions Trie data structure serialised with Recursive Length Prefix (RLP) encoding
type ProgressValue ¶
ProgressValue ...
type TransactionDB ¶
TransactionDB ...
func (*TransactionDB) Maintain ¶
func (t *TransactionDB) Maintain(fn *ProgressCB) error
Maintain ...
func (*TransactionDB) Transaction ¶
func (t *TransactionDB) Transaction(fn func() bool) (bool, error)
Transaction ...
Click to show internal directories.
Click to hide internal directories.