Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertAPIError(err error) error
- func IsAPIError(err error) bool
- type BuildInfoRequest
- type BuildInfoResponse
- type BuildInfoResponseData
- 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 Heuristics ¶
type HeuristicsRequest ¶
type HeuristicsRequest struct {
PluginContext backend.PluginContext
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func ProvideService ¶
func ProvideService(httpClientProvider httpclient.Provider, cfg *setting.Cfg, features featuremgmt.FeatureToggles, tracer tracing.Tracer) *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)
Click to show internal directories.
Click to hide internal directories.