metric

package
v0.1.1-0...-9c443ec Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	Generate(context.Context) (Values, error)
}

Generator interface generates metrics

func NewPluginGenerator

func NewPluginGenerator(p *cconfig.MetricPlugin) Generator

NewPluginGenerator creates a new plugin generator

type Manager

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

Manager in metric manager

func NewManager

func NewManager(generators map[string][]Generator, client api.Client) *Manager

NewManager creates metric manager instanace

func (*Manager) Run

func (m *Manager) Run(ctx context.Context, interval time.Duration) (err error)

Run collect and send metrics

type Values

type Values map[string]float64

Values represents metric values

Jump to

Keyboard shortcuts

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