plugins

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogLevelSilent = iota
	LogLevelError
	LogLevelWarn
	LogLevelInfo
	LogLevelDebug
)

Variables

View Source
var (
	StdOutLog = &simpleLog{Level: LogLevelDebug, Writer: StdOutWriter}
)
View Source
var StdOutMetric = NewMetric(StdOutWriter)
View Source
var StdOutWriter = &stdout{Writer: os.Stdout}

Functions

func NewMetric

func NewMetric(m MetricWriter) *metric

Types

type Logger

type Logger interface {
	LogLevel() int
	Info(msg string, args ...interface{})
	Warn(msg string, args ...interface{})
	Error(msg string, args ...interface{})
	Debug(msg string, args ...interface{})
}

type MetricWriter

type MetricWriter interface {
	Metric(name string, time time.Duration)
}

type Metrics

type Metrics interface {
	ExecutionTime(name string, call func())
}

Jump to

Keyboard shortcuts

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