Documentation ¶
Index ¶
- Variables
- type Batch
- func (b *Batch) Begin(writable bool) storage.KeyValueTxn
- func (b *Batch) BeginWithPrefix(writable bool, prefix string) storage.KeyValueTxn
- func (b *Batch) Commit() error
- func (b *Batch) Discard()
- func (b *Batch) Get(key storage.Key) (v []byte, err error)
- func (b *Batch) Put(key storage.Key, value []byte) error
- func (b *Batch) PutAll(values map[storage.Key][]byte) error
- type DB
Constants ¶
This section is empty.
Variables ¶
View Source
var TruncateBadger = false
TruncateBadger controls whether Badger is configured to truncate corrupted data. Especially on Windows, if the node is terminated abruptly, setting this may be necessary to recovering the state of the system.
However, Accumulate is not robust against this kind of interruption. If the node is terminated abruptly and restarted with this flag, some functions may break, such as synthetic transactions and anchoring.
Functions ¶
This section is empty.
Types ¶
type Batch ¶
type Batch struct {
// contains filtered or unexported fields
}
func (*Batch) BeginWithPrefix ¶
func (b *Batch) BeginWithPrefix(writable bool, prefix string) storage.KeyValueTxn
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) BeginWithPrefix ¶
func (db *DB) BeginWithPrefix(writable bool, prefix string) storage.KeyValueTxn
Click to show internal directories.
Click to hide internal directories.