Documentation
¶
Index ¶
- type KV
- type Lithium
- func (l *Lithium) Close() error
- func (l *Lithium) Delete(key []byte) error
- func (l *Lithium) Get(key []byte) (dst []byte, err error)
- func (l *Lithium) NextSequence() (uint64, error)
- func (l *Lithium) Open(path string, mode os.FileMode, timeout time.Duration) (err error)
- func (l *Lithium) Put(key, value []byte) (err error)
- func (l *Lithium) Reopen() error
- func (l *Lithium) Scan(prefix []byte) (<-chan ScanEntry, func())
- type LithiumScanEntry
- type MockedKV
- func (m *MockedKV) Close() error
- func (m *MockedKV) Delete(key []byte) error
- func (m *MockedKV) Get(key []byte) ([]byte, error)
- func (m *MockedKV) NextSequence() (uint64, error)
- func (m *MockedKV) Open(string, os.FileMode, time.Duration) error
- func (m *MockedKV) Put(key, value []byte) error
- func (m *MockedKV) Scan(prefix []byte) (<-chan ScanEntry, func())
- type MockedScanEntry
- type ScanEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV interface {
Open(path string, mode os.FileMode, timeout time.Duration) error
Close() error
Put([]byte, []byte) error
Get([]byte) ([]byte, error)
Delete([]byte) error
Scan([]byte) (<-chan ScanEntry, func())
NextSequence() (ID uint64, err error)
}
KV is the key/value store backing the WAL.
type Lithium ¶
Lithium is a bbolt backed KV.
func NewLithium ¶
func NewLithium() *Lithium
func (*Lithium) NextSequence ¶
type LithiumScanEntry ¶
type LithiumScanEntry struct {
// contains filtered or unexported fields
}
LithiumScanEntry is a key/value pair produced by Lithium.Scan.
func (LithiumScanEntry) Error ¶
func (e LithiumScanEntry) Error() error
func (LithiumScanEntry) Pair ¶
func (e LithiumScanEntry) Pair() ([]byte, []byte)
type MockedKV ¶
MockedKV is an in-memory KV for tests.
func NewMockedKV ¶
func NewMockedKV() *MockedKV
func (*MockedKV) NextSequence ¶
type MockedScanEntry ¶
MockedScanEntry is a key/value pair produced by MockedKV.Scan.
func (MockedScanEntry) Error ¶
func (e MockedScanEntry) Error() error
func (MockedScanEntry) Pair ¶
func (e MockedScanEntry) Pair() ([]byte, []byte)
Click to show internal directories.
Click to hide internal directories.