Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertAPIError(err error) error
- func IsAPIError(err error) bool
- type BuildInfoRequest
- type BuildInfoResponse
- type BuildInfoResponseData
- type ExtendOptions
- type Features
- type Heuristics
- type HeuristicsRequest
- type Service
- func (s *Service) CallResource(ctx context.Context, req *backend.CallResourceRequest, ...) error
- func (s *Service) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
- func (s *Service) GetBuildInfo(ctx context.Context, req BuildInfoRequest) (*BuildInfoResponse, error)
- func (s *Service) GetHeuristics(ctx context.Context, req HeuristicsRequest) (*Heuristics, error)
- func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
Constants ¶
View Source
const ( KindPrometheus = "Prometheus" KindMimir = "Mimir" )
Variables ¶
View Source
var (
ErrNoBuildInfo = errors.New("no build info")
)
Functions ¶
func ConvertAPIError ¶
func IsAPIError ¶
IsAPIError returns whether err is or wraps a Prometheus error.
Types ¶
type BuildInfoRequest ¶
type BuildInfoRequest struct {
PluginContext backend.PluginContext
}
type BuildInfoResponse ¶
type BuildInfoResponse struct { Status string `json:"status"` Data BuildInfoResponseData `json:"data"` }
type BuildInfoResponseData ¶
type ExtendOptions ¶
type ExtendOptions func(ctx context.Context, settings backend.DataSourceInstanceSettings, clientOpts *sdkhttpclient.Options) error
type Heuristics ¶
type HeuristicsRequest ¶
type HeuristicsRequest struct {
PluginContext backend.PluginContext
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(httpClientProvider *sdkhttpclient.Provider, plog log.Logger, extendOptions ExtendOptions) *Service
func (*Service) CallResource ¶
func (s *Service) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error
func (*Service) CheckHealth ¶
func (s *Service) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)
func (*Service) GetBuildInfo ¶
func (s *Service) GetBuildInfo(ctx context.Context, req BuildInfoRequest) (*BuildInfoResponse, error)
func (*Service) GetHeuristics ¶
func (s *Service) GetHeuristics(ctx context.Context, req HeuristicsRequest) (*Heuristics, error)
func (*Service) QueryData ¶
func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error)
Directories ¶
Path | Synopsis |
---|---|
Package intervalv2 partially copied from https://github.com/grafana/grafana/blob/main/pkg/tsdb/intervalv2/intervalv2.go
|
Package intervalv2 partially copied from https://github.com/grafana/grafana/blob/main/pkg/tsdb/intervalv2/intervalv2.go |
Click to show internal directories.
Click to hide internal directories.