fake

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectFunc

type CollectFunc func(context.Context) (*sources.MetricsBatch, error)

CollectFunc is the function signature of FunctionSource#GenerateBatch, and knows how to generate a MetricsBatch.

type FunctionSource

type FunctionSource struct {
	SourceName    string
	GenerateBatch CollectFunc
}

FunctionSource is a sources.MetricSource that calls a function to return the given data points

func (*FunctionSource) Collect

func (*FunctionSource) Name

func (f *FunctionSource) Name() string

type StaticSourceProvider

type StaticSourceProvider []sources.MetricSource

StaticSourceProvider is a fake sources.MetricSourceProvider that returns metrics from a static list.

func (StaticSourceProvider) GetMetricSources

func (p StaticSourceProvider) GetMetricSources() ([]sources.MetricSource, error)

Jump to

Keyboard shortcuts

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