agent

package
v0.0.0-...-2a2e17e Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAccumulator

func NewAccumulator(
	maker MetricMaker,
	metrics chan<- internal.Metric,
) plugins.Accumulator

Types

type Agent

type Agent struct {
	Config *config.Config
}

Agent runs a set of plugins.

func NewAgent

func NewAgent(config *config.Config) (*Agent, error)

NewAgent returns an Agent for the given Config.

func (*Agent) Precision

func (a *Agent) Precision() time.Duration

Returns the rounding precision for metrics.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

Run starts and runs the Agent until the context is done.

type MetricMaker

type MetricMaker interface {
	LogName() string
	MakeMetric(metric internal.Metric) internal.Metric
}

type Ticker

type Ticker struct {
	C chan time.Time
	// contains filtered or unexported fields
}

func NewTicker

func NewTicker(
	interval time.Duration,
	jitter time.Duration,
) *Ticker

func (*Ticker) Stop

func (t *Ticker) Stop()

Jump to

Keyboard shortcuts

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