Documentation ¶
Index ¶
- type Badger
- func (b *Badger) Delete(key string) (err error)
- func (b *Badger) Empty() (err error)
- func (b *Badger) IsStored(key string) bool
- func (b *Badger) Read(key string) (value []byte, err error)
- func (b *Badger) ReadFirstValueByPrefix(prefix string) (value []byte, err error)
- func (b *Badger) ReadKeyValues() (value map[string][]byte, err error)
- func (b *Badger) ReadKeys() (value []string, err error)
- func (b *Badger) ReadKeysWithPrefix(prefix string) (keys []string, err error)
- func (b *Badger) ReadPrefix(prefix string) (value [][]byte, err error)
- func (b *Badger) ReadPrefixWithKey(prefix string) (value map[string][]byte, err error)
- func (b *Badger) Store(key string, value []byte) error
- func (b *Badger) StoreBatch(batch interface{}) (err error)
- func (b *Badger) StoreQueueBatch(v interface{}) (err error)
- type Config
- type KV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Badger ¶
type Badger struct {
*badger.DB
}
Badger client wrapper
func (*Badger) IsStored ¶
IsStored returns true if the block corresponding to passed hash is stored in db
func (*Badger) ReadFirstValueByPrefix ¶
ReadFirstValueByPrefix returns the first value matched by prefix
func (*Badger) ReadKeyValues ¶
ReadKeyValues concurrent read values based on a prefix
func (*Badger) ReadKeysWithPrefix ¶
ReadKeysWithPrefix concurrent read values based on a prefix
func (*Badger) ReadPrefix ¶
ReadPrefix concurrent read values based on a prefix
func (*Badger) ReadPrefixWithKey ¶
ReadPrefixWithKey concurrent read values based on a prefix
func (*Badger) StoreBatch ¶
StoreBatch insert new key-value in badger
func (*Badger) StoreQueueBatch ¶
StoreQueueBatch loads a queue until a threshold to perform a bulk insertion
Click to show internal directories.
Click to hide internal directories.