metrics

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 8 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 {
	GetLatestMetrics(opt *pb.GetMetricsOpts) ([]*model.MetricSpec, error)
	GetInstantMetrics(opt *pb.GetMetricsOpts) ([]*model.MetricSpec, error)
	GetRangeMetrics(opt *pb.GetMetricsOpts) ([]*model.MetricSpec, error)
	SetDock(dockInfo *model.DockSpec)
}

Controller is an interface for exposing some operations of metric controllers.

func NewController

func NewController() Controller

NewController method creates a controller structure and expose its pointer.

type Data

type Data struct {
	ResultType string   `json:"resultType"`
	Result     []Result `json:"result"`
}

type InstantMetricReponseFromPrometheus

type InstantMetricReponseFromPrometheus struct {
	Status string `json:"status"`
	Data   Data   `json:"data"`
}

latest+instant metrics structs begin

type Metric

type Metric struct {
	Name       string `json:"__name__"`
	Device     string `json:"device"`
	InstanceID string `json:"instanceID"`
	Job        string `json:"job"`
}

type RangeData

type RangeData struct {
	ResultType string        `json:"resultType"`
	Result     []RangeResult `json:"result"`
}

type RangeMetric

type RangeMetric struct {
	Name     string `json:"__name__"`
	Device   string `json:"device"`
	Instance string `json:"instance"`
	Job      string `json:"job"`
}

type RangeMetricReponseFromPrometheus

type RangeMetricReponseFromPrometheus struct {
	Status string    `json:"status"`
	Data   RangeData `json:"data"`
}

latest+range metrics structs begin

type RangeResult

type RangeResult struct {
	Metric RangeMetric     `json:"metric"`
	Values [][]interface{} `json:"values"`
}

type Result

type Result struct {
	Metric Metric        `json:"metric"`
	Value  []interface{} `json:"value"`
}

Directories

Path Synopsis
exporters

Jump to

Keyboard shortcuts

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