Documentation ¶
Index ¶
- Variables
- func IsConflict(err error) bool
- func IsNotFound(err error) bool
- type ChangeType
- type Database
- type Iterator
- type LocalDB
- func (b *LocalDB) Close() error
- func (b *LocalDB) Observe(ctx context.Context, path dbpath.Matcher) <-chan ObservedChanges
- func (b *LocalDB) Read(fn func(tx ReadTx) error) (err error)
- func (b *LocalDB) ReadWithContext(ctx context.Context, fn func(tx ReadTx) error) (err error)
- func (b *LocalDB) Stats() (*bbolt.Stats, error)
- func (b *LocalDB) Write(fn func(tx WriteTx) error) (err error)
- func (b *LocalDB) WriteWithContext(ctx context.Context, fn func(tx WriteTx) error) (err error)
- type ObservedChange
- type ObservedChanges
- type Options
- type ReadTx
- type WriteTx
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConflict = errors.New("conflict")
View Source
var ErrNotFound = errors.New("not found")
Functions ¶
func IsConflict ¶ added in v0.8.0
func IsNotFound ¶ added in v0.7.0
Types ¶
type ChangeType ¶ added in v0.3.0
type ChangeType int
const ( ChangeTypeNoChange ChangeType = iota ChangeTypeMapCreated ChangeTypeValueSet ChangeTypeDeleted )
type Database ¶ added in v0.8.0
type Database interface { Read(func(tx ReadTx) error) error ReadWithContext(context.Context, func(tx ReadTx) error) error Write(func(tx WriteTx) error) error WriteWithContext(context.Context, func(tx WriteTx) error) error Observe(ctx context.Context, path dbpath.Matcher) <-chan ObservedChanges Close() error Stats() (*bbolt.Stats, error) }
type LocalDB ¶ added in v0.11.0
type LocalDB struct {
// contains filtered or unexported fields
}
func (*LocalDB) ReadWithContext ¶ added in v1.0.1
type ObservedChange ¶ added in v0.6.0
type ObservedChange struct { Path dbpath.Path Type ChangeType }
type ObservedChanges map[string]ChangeType
type ObservedChanges ¶ added in v0.6.0
type ObservedChanges []ObservedChange
func (ObservedChanges) TypeOfChange ¶ added in v0.6.1
func (o ObservedChanges) TypeOfChange(path dbpath.Path) ChangeType
func (ObservedChanges) Update ¶ added in v0.8.0
func (o ObservedChanges) Update(path dbpath.Path, t ChangeType) ObservedChanges
Source Files ¶
Click to show internal directories.
Click to hide internal directories.