Documentation ¶
Index ¶
- type BoltDB
- func (p *BoltDB) BatchFetch(offset []byte, size int) ([]*KV, error)
- func (p *BoltDB) BatchPut(kvs []*KV) error
- func (p *BoltDB) BatchPutV(vs [][]byte) error
- func (p *BoltDB) BucketDelete(bucket, key []byte) error
- func (p *BoltDB) BucketGet(bucket, key []byte) (value []byte, err error)
- func (p *BoltDB) BucketList(bucket []byte) (map[string][]byte, error)
- func (p *BoltDB) BucketPut(bucket, key, value []byte) error
- func (p *BoltDB) Clean(timestamp uint64) (count uint64, err error)
- func (p *BoltDB) Close()
- func (p *BoltDB) Delete(key []byte) error
- func (p *BoltDB) Fetch(offset []byte) (key, value []byte, err error)
- func (p *BoltDB) Get(key []byte) (value []byte, err error)
- func (p *BoltDB) Put(key, value []byte) error
- func (p *BoltDB) Sequence() (sid uint64, err error)
- type Database
- type Factory
- type KV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltDB ¶
BoltDB use boltdb to persist data
func (*BoltDB) BatchFetch ¶
BatchFetch fetches KVs by offset in batch mode
func (*BoltDB) BucketDelete ¶
BucketDelete deletes a KV in bucket by key
func (*BoltDB) BucketList ¶
BucketList lists all KVs in bucket
type Database ¶
type Database interface { Sequence() (uint64, error) // Put(key, value []byte) error Get(key []byte) ([]byte, error) // Fetch(offset []byte) ([]byte, []byte, error) Delete(key []byte) error Clean(timestamp uint64) (uint64, error) Close() BatchPut(kvs []*KV) error BatchPutV(vs [][]byte) error BatchFetch(offset []byte, size int) ([]*KV, error) BucketPut(bucket, key, value []byte) error BucketGet(bucket, key []byte) ([]byte, error) BucketList(bucket []byte) (map[string][]byte, error) BucketDelete(bucket, key []byte) error }
Database persistence interfaces
type Factory ¶
Factory persistence factory
func NewFactory ¶
NewFactory creates a persistence factory
Click to show internal directories.
Click to hide internal directories.