db

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewHandler

func NewHandler(args *HandlerArgs) (*Handler, error)

func (*Handler) Close

func (h *Handler) Close() error

func (*Handler) Log

func (h *Handler) Log(r *log15.Record) error

type HandlerArgs

type HandlerArgs struct {
	Driver                      *sql.DB
	InsertFrequencyMilliSeconds int
	Namespace                   string
	InstanceID                  string
}

type Logger

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

func NewLogger

func NewLogger(database string) (*Logger, error)

func (*Logger) CloseConnection

func (l *Logger) CloseConnection() error

func (*Logger) Connect

func (l *Logger) Connect(database string) error

func (*Logger) DeleteInstanceLogs

func (l *Logger) DeleteInstanceLogs(instance string) error

func (*Logger) LoggerFunc

func (l *Logger) LoggerFunc(namespace, instance string) (dlog.Logger, error)

func (*Logger) QueryLogs

func (l *Logger) QueryLogs(ctx context.Context, instance string, limit, offset int) (dlog.QueryReponse, error)

Jump to

Keyboard shortcuts

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