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 (f *FunctionSource) Collect(ctx context.Context) (*sources.MetricsBatch, error)
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)
Click to show internal directories.
Click to hide internal directories.