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 []byte, 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) (err error)
- func (m *MockedKV) Get(key []byte) (value []byte, err error)
- func (m *MockedKV) NextSequence() (nextSeq uint64, err error)
- func (m *MockedKV) Open(string, os.FileMode, time.Duration) error
- func (m *MockedKV) Put(key, value []byte) (err error)
- func (m *MockedKV) Scan(prefix []byte) (<-chan ScanEntry, func())
- type MockedScanEntry
- type OpenCloser
- type ScanEntry
- type Scanner
- type Sequencer
- type Simpler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KV ¶
type KV interface { OpenCloser Simpler Scanner Sequencer }
KV is the interface that groups the Simpler and Scanner interfaces.
type Lithium ¶
type Lithium struct { sync.Mutex // Name of the root bucket. RootBucketKey []byte // contains filtered or unexported fields }
Lithium .
func (*Lithium) NextSequence ¶
NextSequence generates a new sequence.
type LithiumScanEntry ¶
type LithiumScanEntry struct {
// contains filtered or unexported fields
}
LithiumScanEntry indicates an entry of scanning.
func (LithiumScanEntry) Pair ¶
func (e LithiumScanEntry) Pair() ([]byte, []byte)
Pair means a pair of key/value.
type MockedScanEntry ¶
MockedScanEntry .
type OpenCloser ¶
type OpenCloser interface { Open(path string, mode os.FileMode, timeout time.Duration) error Close() error }
OpenCloser is the interface that groups the basic Open and Close methods.
Click to show internal directories.
Click to hide internal directories.