mdbbadger

package
v2.0.0-beta9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

DB is a collection of Events stored in BadgerDB

func Open

func Open(b *badger.DB, events ...string) (*DB, error)

Open opens a new Event collection stored in BadgerDB

func (*DB) Close

func (db *DB) Close() error

Close implements meter.DB interface

func (*DB) Compaction

func (db *DB) Compaction(now time.Time) error

Compaction merges event snapshot compacting data to hourly batches

func (*DB) DumpKeys

func (db *DB) DumpKeys(w io.Writer) error

DumpKeys dumps keys from a badger.DB to a writer

func (*DB) Query

func (db *DB) Query(ctx context.Context, q meter.Query, events ...string) (meter.Results, error)

Query implements meter.Querier interface

func (DB) Scanner

func (db DB) Scanner(event string) meter.Scanner

Scanner implements Scanners interface

func (*DB) Storer

func (db *DB) Storer(event string) meter.Storer

Storer implements Storerer interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL