Documentation ¶
Index ¶
- func GetRaft(ctx context.Context) *badger.DB
- func Observe(ctx context.Context, prefix []byte, obs func(context.Context, *badger.KVList))
- func Open(ctx context.Context, path string, logLevel ...string) (context.Context, *badger.DB)
- func OpenRaft(ctx context.Context, path string) (context.Context, *badger.DB)
- func Path(dbPath string) string
- func Set(ctx context.Context, p Provider) context.Context
- type Iter
- type IterOpts
- type Provider
- type Txn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Observe ¶ added in v0.0.42
Observe watches for database changes on key prefix and call obs withe changed keys.
Types ¶
type Provider ¶ added in v0.0.30
type Txn ¶ added in v0.0.30
type Txn interface { Set(key, value []byte) error SetTTL(key, value []byte, ttl time.Duration) error // Get retrieves a key and calls value with the data. When the key is not found // and nofFound is present then notFound is called. Get(key []byte, value func(val []byte) error, notFound ...func() error) error Has(key []byte) bool Delete(key []byte, notFound ...func() error) error Close() error Iter(IterOpts) Iter }
Click to show internal directories.
Click to hide internal directories.