Documentation ¶
Index ¶
- type BoltBucket
- type BoltStorage
- func (b *BoltStorage) All() (map[string][]byte, error)
- func (b *BoltStorage) BatchUpdate(key, value []byte) error
- func (b *BoltStorage) Close()
- func (b *BoltStorage) Delete(key []byte) error
- func (b *BoltStorage) DeleteBucket(name string) error
- func (b *BoltStorage) Get(key []byte) ([]byte, error)
- func (b *BoltStorage) NewBucket(name string) (*BoltBucket, error)
- func (b *BoltStorage) Set(key, value []byte) error
- func (b *BoltStorage) Sync() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltBucket ¶
type BoltBucket struct { *BoltStorage // contains filtered or unexported fields }
func (*BoltBucket) All ¶
func (bb *BoltBucket) All() (map[string][]byte, error)
All 获取指定 Bucket 中所有数据
func (*BoltBucket) BatchUpdate ¶
func (bb *BoltBucket) BatchUpdate(key, value []byte) error
Update 数据, 当使用多线程/协程处理时,用此方法
type BoltStorage ¶
type BoltStorage struct {
// contains filtered or unexported fields
}
func NewBolt ¶
func NewBolt(dbPath string) (*BoltStorage, error)
func (*BoltStorage) BatchUpdate ¶
func (b *BoltStorage) BatchUpdate(key, value []byte) error
func (*BoltStorage) Close ¶
func (b *BoltStorage) Close()
func (*BoltStorage) Delete ¶
func (b *BoltStorage) Delete(key []byte) error
func (*BoltStorage) DeleteBucket ¶
func (b *BoltStorage) DeleteBucket(name string) error
DeleteBucket 删除指定 Bucket
func (*BoltStorage) NewBucket ¶
func (b *BoltStorage) NewBucket(name string) (*BoltBucket, error)
NewBucket 创建一个新的 Bucket
func (*BoltStorage) Set ¶
func (b *BoltStorage) Set(key, value []byte) error
Click to show internal directories.
Click to hide internal directories.