controller

package
v0.2.1-0...-b772245 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller interface {
	// GetSingleMetric will get one single metric value at a point in time.
	GetSingleMetric(ctx context.Context, query model.Query, t time.Time) (*model.Metric, error)
	// GetSingleInstantMetric will get one single metric value in real time.
	GetSingleInstantMetric(ctx context.Context, query model.Query) (*model.Metric, error)
	// GetRangeMetrics will get N metrics based in a time range.
	GetRangeMetrics(ctx context.Context, query model.Query, start, end time.Time, step time.Duration) ([]model.MetricSeries, error)
}

Controller is what has the domain logic, the one that can translate from the views to the models.

func NewController

func NewController(gatherer metric.Gatherer) Controller

NewController returns a new controller.

Jump to

Keyboard shortcuts

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