Documentation ¶
Index ¶
- func New(name, dir string) (db.DB, error)
- func NewWithOptions(name string, dir string, opts *bbolt.Options) (db.DB, error)
- type BoltDB
- func (bdb *BoltDB) Close()
- func (bdb *BoltDB) Delete(key []byte)
- func (bdb *BoltDB) DeleteSync(key []byte)
- func (bdb *BoltDB) Get(key []byte) (value []byte)
- func (bdb *BoltDB) Has(key []byte) bool
- func (bdb *BoltDB) Iterator(start, end []byte) db.Iterator
- func (bdb *BoltDB) NewBatch() db.Batch
- func (bdb *BoltDB) Print()
- func (bdb *BoltDB) ReverseIterator(start, end []byte) db.Iterator
- func (bdb *BoltDB) Set(key, value []byte)
- func (bdb *BoltDB) SetSync(key, value []byte)
- func (bdb *BoltDB) Stats() map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BoltDB ¶
type BoltDB struct {
// contains filtered or unexported fields
}
BoltDB is a wrapper around etcd's fork of bolt (https://go.etcd.io/bbolt).
NOTE: All operations (including Set, Delete) are synchronous by default. One can globally turn it off by using NoSync config option (not recommended).
A single bucket ([]byte("tm")) is used per a database instance. This could lead to performance issues when/if there will be lots of keys.
func (*BoltDB) DeleteSync ¶
func (*BoltDB) Iterator ¶
WARNING: Any concurrent writes or reads will block until the iterator is closed.
func (*BoltDB) ReverseIterator ¶
WARNING: Any concurrent writes or reads will block until the iterator is closed.
Click to show internal directories.
Click to hide internal directories.