prometheus

package
v0.0.0-kmdagger3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: AGPL-3.0 Imports: 24 Imported by: 134

Documentation

Index

Constants

View Source
const (
	KindPrometheus = "Prometheus"
	KindMimir      = "Mimir"
)

Variables

View Source
var (
	ErrNoBuildInfo = errors.New("no build info")
)

Functions

func ConvertAPIError

func ConvertAPIError(err error) error

func IsAPIError

func IsAPIError(err error) bool

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 BuildInfoResponseData struct {
	Version   string            `json:"version"`
	Revision  string            `json:"revision"`
	Branch    string            `json:"branch"`
	Features  map[string]string `json:"features"`
	BuildUser string            `json:"buildUser"`
	BuildDate string            `json:"buildDate"`
	GoVersion string            `json:"goVersion"`
}

type Features

type Features struct {
	RulerApiEnabled bool `json:"rulerApiEnabled"`
}

type Heuristics

type Heuristics struct {
	Application string   `json:"application"`
	Features    Features `json:"features"`
}

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 (*Service) CheckHealth

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

Directories

Path Synopsis
kinds

Jump to

Keyboard shortcuts

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