mimir

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PrometheusRuleGroupKind = "PrometheusRuleGroup"

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider is a grizzly.Provider implementation for Grafana.

func NewProvider

func NewProvider(config *config.MimirConfig) *Provider

NewProvider instantiates a new Provider.

func (*Provider) APIVersion

func (p *Provider) APIVersion() string

APIVersion returns the group and version of this provider

func (*Provider) GetHandlers

func (p *Provider) GetHandlers() []grizzly.Handler

GetHandlers identifies the handlers for the Grafana provider

func (*Provider) Group

func (p *Provider) Group() string

Group returns the group name of the Grafana provider

func (*Provider) Name added in v0.4.1

func (p *Provider) Name() string

func (*Provider) Status added in v0.5.0

func (p *Provider) Status() grizzly.ProviderStatus

func (*Provider) Validate added in v0.4.2

func (p *Provider) Validate() error

func (*Provider) Version

func (p *Provider) Version() string

Version returns the version of this provider

type RuleHandler

type RuleHandler struct {
	grizzly.BaseHandler
	// contains filtered or unexported fields
}

RuleHandler is a Grizzly Handler for Prometheus Rules

func NewRuleHandler

func NewRuleHandler(provider *Provider, clientTool client.Mimir) *RuleHandler

NewRuleHandler returns a new Grizzly Handler for Prometheus Rules

func (*RuleHandler) Add

func (h *RuleHandler) Add(resource grizzly.Resource) error

Add pushes a datasource to Grafana via the API

func (*RuleHandler) GetByUID

func (h *RuleHandler) GetByUID(uid string) (*grizzly.Resource, error)

GetByUID retrieves JSON for a resource from an endpoint, by UID

func (*RuleHandler) GetRemote

func (h *RuleHandler) GetRemote(resource grizzly.Resource) (*grizzly.Resource, error)

GetRemote retrieves a datasource as a Resource

func (*RuleHandler) GetSpecUID

func (h *RuleHandler) GetSpecUID(resource grizzly.Resource) (string, error)

func (*RuleHandler) GetUID

func (h *RuleHandler) GetUID(resource grizzly.Resource) (string, error)

GetUID returns the UID for a resource

func (*RuleHandler) ListRemote

func (h *RuleHandler) ListRemote() ([]string, error)

ListRemote retrieves as list of UIDs of all remote resources

func (*RuleHandler) ResourceFilePath

func (h *RuleHandler) ResourceFilePath(resource grizzly.Resource, filetype string) string

ResourceFilePath returns the location on disk where a resource should be updated

func (*RuleHandler) Update

func (h *RuleHandler) Update(existing, resource grizzly.Resource) error

Update pushes a datasource to Grafana via the API

func (*RuleHandler) Validate

func (h *RuleHandler) Validate(resource grizzly.Resource) error

Validate returns the uid of resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳