Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Query ¶
type Query struct {
Expr string
Step time.Duration
LegendFormat string
Start time.Time
End time.Time
RefId string
InstantQuery bool
RangeQuery bool
ExemplarQuery bool
UtcOffsetSec int64
}
func Parse ¶
func Parse(query backend.DataQuery, timeInterval string, intervalCalculator intervalv2.Calculator, fromAlert bool) (*Query, error)
func (*Query) Type ¶
func (query *Query) Type() TimeSeriesQueryType
type QueryModel ¶
type QueryModel struct {
dataquery.PrometheusDataQuery
// The following properties may be part of the request payload, however they are not saved in panel JSON
// Timezone offset to align start & end time on backend
UtcOffsetSec int64 `json:"utcOffsetSec,omitempty"`
LegendFormat string `json:"legendFormat,omitempty"`
Interval string `json:"interval,omitempty"`
IntervalMs int64 `json:"intervalMs,omitempty"`
IntervalFactor int64 `json:"intervalFactor,omitempty"`
}
type ResultType ¶
type ResultType string
const ( ResultTypeMatrix ResultType = "matrix" ResultTypeExemplar ResultType = "exemplar" ResultTypeVector ResultType = "vector" ResultTypeUnknown ResultType = "" )
func ResultTypeFromFrame ¶
func ResultTypeFromFrame(frame *data.Frame) ResultType
func (ResultType) String ¶
func (r ResultType) String() string
type TimeSeriesQueryType ¶
type TimeSeriesQueryType string
const ( RangeQueryType TimeSeriesQueryType = "range" InstantQueryType TimeSeriesQueryType = "instant" ExemplarQueryType TimeSeriesQueryType = "exemplar" UnknownQueryType TimeSeriesQueryType = "unknown" )
Click to show internal directories.
Click to hide internal directories.