console

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEnable is default state for metrics
	DefaultEnable = false
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled           bool          `toml:"enabled"`
	ReportingInterval toml.Duration `toml:"reporting-interval"`
}

Config represents the meta configuration.

func NewConfig

func NewConfig() Config

NewConfig builds a new configuration with default values.

func (Config) Validate

func (c Config) Validate() error

Validate the config

type Reporter

type Reporter struct {
	Config Config
}

Reporter type

func NewReporter

func NewReporter(config Config) *Reporter

NewReporter returns a new reporter

func (*Reporter) LogResult

func (r *Reporter) LogResult(evt *adapters.LogEvent) error

LogResult logs a log line if SupportsLogging is enabled

func (*Reporter) StartReporting

func (r *Reporter) StartReporting() error

StartReporting starts the recording process

func (*Reporter) StopReporting

func (r *Reporter) StopReporting() error

StopReporting stops the recording process

func (*Reporter) SupportsLogging

func (r *Reporter) SupportsLogging() bool

SupportsLogging returns if the adapter supports logging

Jump to

Keyboard shortcuts

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