Documentation ¶
Overview ¶
Package localdb implements a diviner database on the local file system using boltdb.
Index ¶
- type DB
- func (d *DB) AppendRunMetrics(ctx context.Context, study string, seq uint64, metrics diviner.Metrics) error
- func (d *DB) CreateStudyIfNotExist(ctx context.Context, study diviner.Study) (created bool, err error)
- func (*DB) CreateTable(_ context.Context) error
- func (d *DB) InsertRun(ctx context.Context, run diviner.Run) (diviner.Run, error)
- func (d *DB) ListRuns(ctx context.Context, study string, states diviner.RunState, since time.Time) (runs []diviner.Run, err error)
- func (d *DB) ListStudies(ctx context.Context, prefix string, since time.Time) (studies []diviner.Study, err error)
- func (d *DB) Log(study string, seq uint64, since time.Time, follow bool) io.Reader
- func (d *DB) Logger(study string, seq uint64) io.WriteCloser
- func (d *DB) LookupRun(ctx context.Context, study string, seq uint64) (run diviner.Run, err error)
- func (d *DB) LookupStudy(ctx context.Context, name string) (study diviner.Study, err error)
- func (d *DB) NextSeq(ctx context.Context, study string) (seq uint64, err error)
- func (d *DB) UpdateRun(ctx context.Context, study string, seq uint64, state diviner.RunState, ...) error
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 implements diviner.Database using Bolt.
func Open ¶
Open opens and returns a new database with the provided filename. The file is created if it does not already exist.
func (*DB) AppendRunMetrics ¶
func (*DB) CreateStudyIfNotExist ¶
func (*DB) ListRuns ¶
func (d *DB) ListRuns(ctx context.Context, study string, states diviner.RunState, since time.Time) (runs []diviner.Run, err error)
Runs implements diviner.Database.
func (*DB) ListStudies ¶
func (d *DB) ListStudies(ctx context.Context, prefix string, since time.Time) (studies []diviner.Study, err error)
Studies implements diviner.Database.
func (*DB) LookupStudy ¶
Study implements diviner.Database.
Click to show internal directories.
Click to hide internal directories.