Documentation
¶
Index ¶
- func CreateClient(roundTripper http.RoundTripper, url string) (apiv1.API, error)
- func CreateTransportOptions(settings backend.DataSourceInstanceSettings, cfg *setting.Cfg, ...) (*sdkhttpclient.Options, error)
- type Buffered
- type ExemplarEvent
- type PrometheusQuery
- type QueryModel
- type TimeSeriesQueryType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateClient ¶
func CreateTransportOptions ¶
func CreateTransportOptions(settings backend.DataSourceInstanceSettings, cfg *setting.Cfg, logger log.Logger) (*sdkhttpclient.Options, error)
CreateTransportOptions creates options for the http client. Probably should be shared and should not live in the buffered package.
Types ¶
type Buffered ¶
type Buffered struct {
ID int64
URL string
TimeInterval string
// contains filtered or unexported fields
}
func New ¶
func New(roundTripper http.RoundTripper, tracer tracing.Tracer, settings backend.DataSourceInstanceSettings, plog log.Logger) (*Buffered, error)
New creates and object capable of executing and parsing a Prometheus queries. It's "buffered" because there is another implementation capable of streaming parse the response.
func (*Buffered) ExecuteTimeSeriesQuery ¶
func (b *Buffered) ExecuteTimeSeriesQuery(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
type ExemplarEvent ¶
type PrometheusQuery ¶
type QueryModel ¶
type QueryModel struct {
Expr string `json:"expr"`
LegendFormat string `json:"legendFormat"`
Interval string `json:"interval"`
IntervalMS int64 `json:"intervalMS"`
StepMode string `json:"stepMode"`
RangeQuery bool `json:"range"`
InstantQuery bool `json:"instant"`
ExemplarQuery bool `json:"exemplar"`
IntervalFactor int64 `json:"intervalFactor"`
UtcOffsetSec int64 `json:"utcOffsetSec"`
}
type TimeSeriesQueryType ¶
type TimeSeriesQueryType string
const ( RangeQueryType TimeSeriesQueryType = "range" InstantQueryType TimeSeriesQueryType = "instant" ExemplarQueryType TimeSeriesQueryType = "exemplar" )
Click to show internal directories.
Click to hide internal directories.