badger

package
v0.0.0-...-0cd5192 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 OpenDatabase

func OpenDatabase(opts badger.Options) (*Database, error)

func (*Database) Close

func (db *Database) Close() error

func (*Database) FindHostByHostname

func (db *Database) FindHostByHostname(ctx context.Context, hostname string) (hosts.Host, error)

func (*Database) FindHostByID

func (db *Database) FindHostByID(ctx context.Context, hostID ulid.ULID) (hosts.Host, error)

func (*Database) ListHTTPLogEntries

func (db *Database) ListHTTPLogEntries(ctx context.Context, params hosts.ListHTTPLogEntriesParams) ([]hosts.HTTPLogEntry, error)

func (*Database) StoreHTTPLogEntry

func (db *Database) StoreHTTPLogEntry(ctx context.Context, entry hosts.HTTPLogEntry) error

func (*Database) StoreHosts

func (db *Database) StoreHosts(ctx context.Context, hosts ...hosts.Host) error

type Logger

type Logger struct {
	*zap.SugaredLogger
}

func NewLogger

func NewLogger(l *zap.SugaredLogger) *Logger

func (*Logger) Warningf

func (l *Logger) Warningf(template string, args ...interface{})

Jump to

Keyboard shortcuts

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