Documentation ¶
Index ¶
- Constants
- func GraphFormatter(apiContext *types.APIContext, resource *types.RawResource)
- func MetricCollectionFormatter(apiContext *types.APIContext, collection *types.GenericCollection)
- func MetricFormatter(apiContext *types.APIContext, resource *types.RawResource)
- func NewTimePoint(value, timestamp float64) (po []float64, isValid bool)
- func QueryGraphCollectionFormatter(apiContext *types.APIContext, collection *types.GenericCollection)
- type ClusterGraphHandler
- type Interval
- type IntervalCalculator
- type IntervalOptions
- type MetricHandler
- type ProjectGraphHandler
- type PrometheusQuery
- type Queries
- type TimeRange
- type TimeSeries
Constants ¶
View Source
const ( ResourceNode = "node" ResourceCluster = "cluster" ResourceEtcd = "etcd" ResourceAPIServer = "apiserver" ResourceScheduler = "scheduler" ResourceControllerManager = "controllermanager" ResourceIngressController = "ingressController" ResourceFluentd = "fluentd" ResourceWorkload = "workload" ResourcePod = "pod" ResourceContainer = "container" )
Variables ¶
This section is empty.
Functions ¶
func GraphFormatter ¶
func GraphFormatter(apiContext *types.APIContext, resource *types.RawResource)
func MetricCollectionFormatter ¶
func MetricCollectionFormatter(apiContext *types.APIContext, collection *types.GenericCollection)
func MetricFormatter ¶
func MetricFormatter(apiContext *types.APIContext, resource *types.RawResource)
func NewTimePoint ¶
func QueryGraphCollectionFormatter ¶
func QueryGraphCollectionFormatter(apiContext *types.APIContext, collection *types.GenericCollection)
Types ¶
type ClusterGraphHandler ¶
type ClusterGraphHandler struct {
// contains filtered or unexported fields
}
func NewClusterGraphHandler ¶
func NewClusterGraphHandler(dialerFactory dialer.Factory, clustermanager *clustermanager.Manager) *ClusterGraphHandler
func (*ClusterGraphHandler) QuerySeriesAction ¶
func (h *ClusterGraphHandler) QuerySeriesAction(actionName string, action *types.Action, apiContext *types.APIContext) error
type IntervalCalculator ¶
type IntervalOptions ¶
type MetricHandler ¶
type MetricHandler struct {
// contains filtered or unexported fields
}
func NewMetricHandler ¶
func NewMetricHandler(dialerFactory dialer.Factory, clustermanager *clustermanager.Manager) *MetricHandler
func (*MetricHandler) Action ¶
func (h *MetricHandler) Action(actionName string, action *types.Action, apiContext *types.APIContext) error
type ProjectGraphHandler ¶
type ProjectGraphHandler struct {
// contains filtered or unexported fields
}
func NewProjectGraphHandler ¶
func NewProjectGraphHandler(dialerFactory dialer.Factory, clustermanager *clustermanager.Manager) *ProjectGraphHandler
func (*ProjectGraphHandler) QuerySeriesAction ¶
func (h *ProjectGraphHandler) QuerySeriesAction(actionName string, action *types.Action, apiContext *types.APIContext) error
type PrometheusQuery ¶
type PrometheusQuery struct { ID string Expr string Step time.Duration Start time.Time End time.Time LegendFormat string IsInstanceQuery bool }
func InitPromQuery ¶
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func NewPrometheusQuery ¶
func (*Queries) Do ¶
func (q *Queries) Do(querys []*PrometheusQuery) (map[string][]*TimeSeries, error)
func (*Queries) GetLabelValues ¶
func (*Queries) Query ¶
func (q *Queries) Query(query *PrometheusQuery) ([]*TimeSeries, error)
func (*Queries) QueryRange ¶
func (q *Queries) QueryRange(query *PrometheusQuery) ([]*TimeSeries, error)
Click to show internal directories.
Click to hide internal directories.