Documentation ¶
Index ¶
- type Database
- func (db *Database) DeleteByKey(key string) error
- func (db *Database) DeleteByPrefix(prefix string) error
- func (db *Database) Get(key string) ([]byte, bool, error)
- func (db *Database) NewWriter() *Writer
- func (db *Database) ReadDataByPrefix(ctx context.Context, prefix string, callback ReadDataClbk) error
- func (db *Database) Set(key string, data []byte, ttl uint) error
- func (db *Database) Stats() DbStats
- func (db *Database) Sync() error
- type DbContext
- func (ctx *DbContext) Close()
- func (ctx *DbContext) CreateDb(name string, inMemory bool) (*Database, error)
- func (ctx *DbContext) DropDb(name string) error
- func (ctx *DbContext) Exists(name string) bool
- func (ctx *DbContext) GetDb(name string) (*Database, error)
- func (ctx *DbContext) LoadDbs() error
- type DbMetrics
- type DbStats
- type ReadDataClbk
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct {
// contains filtered or unexported fields
}
func (*Database) DeleteByKey ¶
func (*Database) DeleteByPrefix ¶
func (*Database) ReadDataByPrefix ¶
type DbContext ¶
type DbContext struct {
// contains filtered or unexported fields
}
func CreateCtx ¶
func CreateCtx(c config.BadgerConfig) *DbContext
type ReadDataClbk ¶
Click to show internal directories.
Click to hide internal directories.