Documentation
¶
Index ¶
- Variables
- type BadgerOption
- type BadgerStore
- func (b *BadgerStore) Close() error
- func (b *BadgerStore) DeleteRange(min, max uint64) error
- func (b *BadgerStore) FirstIndex() (uint64, error)
- func (b *BadgerStore) Get(key []byte) ([]byte, error)
- func (b *BadgerStore) GetLog(idx uint64, log *raft.Log) error
- func (b *BadgerStore) GetUint64(key []byte) (uint64, error)
- func (b *BadgerStore) LastIndex() (uint64, error)
- func (b *BadgerStore) Set(key, val []byte) error
- func (b *BadgerStore) SetUint64(key []byte, val uint64) error
- func (b *BadgerStore) StoreLog(log *raft.Log) error
- func (b *BadgerStore) StoreLogs(logs []*raft.Log) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyNotFound = badger.ErrKeyNotFound
)
Functions ¶
This section is empty.
Types ¶
type BadgerOption ¶
func Compact ¶
func Compact(b bool) BadgerOption
type BadgerStore ¶
type BadgerStore struct {
// contains filtered or unexported fields
}
func NewBadgerStore ¶
func NewBadgerStore(dir string, opt ...BadgerOption) (*BadgerStore, error)
func (*BadgerStore) Close ¶
func (b *BadgerStore) Close() error
func (*BadgerStore) DeleteRange ¶
func (b *BadgerStore) DeleteRange(min, max uint64) error
func (*BadgerStore) FirstIndex ¶
func (b *BadgerStore) FirstIndex() (uint64, error)
func (*BadgerStore) LastIndex ¶
func (b *BadgerStore) LastIndex() (uint64, error)
func (*BadgerStore) Set ¶
func (b *BadgerStore) Set(key, val []byte) error
Click to show internal directories.
Click to hide internal directories.