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 InstantMetricReponseFromPrometheus ¶
type InstantMetricReponseFromPrometheus struct { Status string `json:"status"` Data Data `json:"data"` }
latest+instant metrics structs begin
type RangeData ¶
type RangeData struct { ResultType string `json:"resultType"` Result []RangeResult `json:"result"` }
type RangeMetric ¶
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"` }
Click to show internal directories.
Click to hide internal directories.