Documentation ¶
Index ¶
- Variables
- func NewBoltStore(path string) (model.Store, uint64, error)
- type BoltIterator
- type BoltSnapshot
- type BoltStore
- func (bs *BoltStore) Applied() uint64
- func (bs *BoltStore) Close() error
- func (bs *BoltStore) Delete(key []byte, timestamp ts.Timestamp, raftIndex uint64) error
- func (bs *BoltStore) Get(key []byte, timestamp ts.Timestamp) (value []byte, err error)
- func (bs *BoltStore) GetSnapshot() (model.Snapshot, error)
- func (bs *BoltStore) NewIterator(startKey, endKey []byte, timestamp ts.Timestamp) model.Iterator
- func (bs *BoltStore) NewWriteBatch() model.WriteBatch
- func (bs *BoltStore) Put(key []byte, value []byte, expireAt int64, timestamp ts.Timestamp, ...) error
- type BoltWriteBatch
- type KvPair
- type SnapIterTx
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var DB_BUCKET []byte = []byte("DbBucket")
View Source
var RAFT_APPLY_ID []byte = []byte("#raft_apply_id")
View Source
var RAFT_BUCKET []byte = []byte("RaftBucket")
Functions ¶
Types ¶
type BoltIterator ¶
type BoltIterator struct {
// contains filtered or unexported fields
}
Iterator iterator
func NewBoltIterator ¶
func NewBoltIterator(db *bolt.DB, startKey, endKey []byte) (*BoltIterator, error)
func (*BoltIterator) Error ¶
func (iter *BoltIterator) Error() error
func (*BoltIterator) Key ¶
func (iter *BoltIterator) Key() []byte
func (*BoltIterator) Value ¶
func (iter *BoltIterator) Value() []byte
type BoltSnapshot ¶
type BoltSnapshot struct {
// contains filtered or unexported fields
}
Snapshot snapshot
func NewBoltSnapshot ¶
func NewBoltSnapshot(db *bolt.DB) (*BoltSnapshot, error)
func (*BoltSnapshot) NewIterator ¶
func (bs *BoltSnapshot) NewIterator(startKey, endKey []byte) model.Iterator
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
Store store
func (*BoltStore) NewIterator ¶
func (*BoltStore) NewWriteBatch ¶
func (bs *BoltStore) NewWriteBatch() model.WriteBatch
批量写入,提交时保证batch里的修改同时对外可见
type BoltWriteBatch ¶
type BoltWriteBatch struct {
// contains filtered or unexported fields
}
WriteBatch write batch
func NewBoltWriteBatch ¶
func NewBoltWriteBatch(db *bolt.DB) (*BoltWriteBatch, error)
func (*BoltWriteBatch) Commit ¶
func (bb *BoltWriteBatch) Commit() error
type SnapIterTx ¶
type SnapIterTx struct {
// contains filtered or unexported fields
}
func (*SnapIterTx) Rollback ¶
func (st *SnapIterTx) Rollback() error
Click to show internal directories.
Click to hide internal directories.