Documentation ¶
Index ¶
- Variables
- func BadgerGC(ctx context.Context, extendedOptions *BadgerGCOptions, db *badger.DB)
- func DefaultOptions(ctx context.Context, filePath string) badger.Options
- func LowMemLowCPUBadgerOptions(ctx context.Context, filePath string) badger.Options
- func LowMemOptions(ctx context.Context, filePath string) badger.Options
- type BadgerGCOptions
- type BadgerLogger
- type DB
- func (t *DB) Close(ctx context.Context) error
- func (t *DB) Commit(ctx context.Context, txn *badger.Txn) error
- func (t *DB) DB() *badger.DB
- func (t *DB) Delete(ctx context.Context, key []byte) error
- func (t *DB) GC(ctx context.Context, options *BadgerGCOptions) error
- func (t *DB) Get(ctx context.Context, txn *badger.Txn, key []byte) (value []byte, err error)
- func (t *DB) MetricEnabled() bool
- func (t *DB) NewTransaction(update bool) *badger.Txn
- func (t *DB) TracingEnabled() bool
- func (t *DB) Update(ctx context.Context, entry *badger.Entry) error
- func (t *DB) View(ctx context.Context, key []byte, callback func([]byte) error) error
- type Option
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultBadgerGCOptions = BadgerGCOptions{ GCDiscardRatio: 0.5, GCInterval: time.Minute * 5, GCSleep: time.Second * 15, }
Functions ¶
func BadgerGC ¶
func BadgerGC(ctx context.Context, extendedOptions *BadgerGCOptions, db *badger.DB)
func DefaultOptions ¶
func LowMemOptions ¶
Types ¶
type BadgerGCOptions ¶
type BadgerLogger ¶
type BadgerLogger struct {
// contains filtered or unexported fields
}
func NewBadgerLogger ¶
func NewBadgerLogger(ctx context.Context, callerSkip int) *BadgerLogger
func (*BadgerLogger) Debugf ¶
func (l *BadgerLogger) Debugf(format string, v ...interface{})
func (*BadgerLogger) Errorf ¶
func (l *BadgerLogger) Errorf(format string, v ...interface{})
func (*BadgerLogger) Infof ¶
func (l *BadgerLogger) Infof(format string, v ...interface{})
func (*BadgerLogger) Warningf ¶
func (l *BadgerLogger) Warningf(format string, v ...interface{})
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func (*DB) MetricEnabled ¶ added in v1.2.5
func (*DB) NewTransaction ¶ added in v1.0.2
func (*DB) TracingEnabled ¶ added in v1.2.5
type Option ¶ added in v1.2.5
type Option = func(opt *option)
func WithMetric ¶ added in v1.2.5
func WithTracing ¶ added in v1.2.5
Click to show internal directories.
Click to hide internal directories.