dlog

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

type Log interface {
	LoggerFunc(namespace, instance string) (Logger, error)
	NamespaceLogger(namespace string) (Logger, error)
	QueryLogs(ctx context.Context, instance string, limit, offset int) (QueryReponse, error)
	DeleteNamespaceLogs(namespace string) error
	DeleteInstanceLogs(instance string) error
}

type LogEntry

type LogEntry struct {
	Level     string            `json:"lvl"`
	Timestamp int64             `json:"time"`
	Message   string            `json:"msg"`
	Context   map[string]string `json:"ctx"`
}

type Logger

type Logger interface {
	log15.Logger
	io.Closer
}

type QueryReponse

type QueryReponse struct {
	Count  int `json:"count"`
	Limit  int `json:"limit,omitempty"`
	Offset int `json:"offset"`
	// Data   []map[string]interface{} `json:"data"`
	Logs []LogEntry `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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