metric

package
v0.0.0-...-61ee147 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metric

type Metric struct {
	Name   string          `json:"name" yaml:"name"`
	Labels []common.KVPair `json:"labels" yaml:"labels"`
}

type MetricClass

type MetricClass struct {
	Name         string        `json:"name" yaml:"name" binding:"required"`
	Description  string        `json:"description" yaml:"description" binding:"required"`
	Key          string        `json:"key" yaml:"key" binding:"required"`
	MetricGroups []MetricGroup `json:"metric_groups" yaml:"metricGroups" binding:"required"`
}

type MetricData

type MetricData struct {
	Metric Metric        `json:"metric" yaml:"metric" binding:"required"`
	Values []MetricValue `json:"values" yaml:"values" binding:"required"`
}

type MetricGroup

type MetricGroup struct {
	Name        string       `json:"name" yaml:"name" binding:"required"`
	Description string       `json:"description" yaml:"description" binding:"required"`
	Metrics     []MetricMeta `json:"metrics" yaml:"metrics" binding:"required"`
}

type MetricMeta

type MetricMeta struct {
	Name        string `json:"name" yaml:"name" binding:"required"`
	Unit        string `json:"unit" yaml:"unit" binding:"required"`
	Description string `json:"description" yaml:"description" binding:"required"`
	Key         string `json:"key" yaml:"key" binding:"required"`
}

type MetricQuery

type MetricQuery struct {
	Labels      []common.KVPair `json:"labels"`
	GroupLabels []string        `json:"group_labels"`
	QueryRange  QueryRange      `json:"query_range"`
	Metrics     []string        `json:"metrics"`
}

type MetricValue

type MetricValue struct {
	Value     float64 `json:"value" yaml:"value" binding:"required"`
	Timestamp float64 `json:"timestamp" yaml:"timestamp" binding:"required"`
}

type PrometheusQueryRangeResponse

type PrometheusQueryRangeResponse struct {
	Status string `json:"status"`
	Data   struct {
		ResultType string `json:"resultType"`
		Result     []struct {
			Metric map[string]string `json:"metric"`
			Values [][]interface{}   `json:"values"`
		} `json:"result"`
	} `json:"data"`
}

type QueryRange

type QueryRange struct {
	StartTimestamp float64 `json:"start_timestamp"`
	EndTimestamp   float64 `json:"end_timestamp"`
	Step           int64   `json:"step"`
}

Jump to

Keyboard shortcuts

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