controller

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2023 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrInvalidKey = "InvalidKey"
)

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() (*rest.Config, error)

GetConfig returns a Kubernetes config

Types

type Controller

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

Controller is the controller implementation for prometheus alert rules to logzio alert rules

func NewController

func NewController(
	kubeclientset *kubernetes.Clientset,
	configmapInformer corev1informers.ConfigMapInformer,
	interestingAnnotation *string,
	logzioApiToken string,
	logzioApiUrl string,
	rulesDs string,
	envId string,
) *Controller

func (*Controller) Run

func (c *Controller) Run(threadiness int, stopCh <-chan struct{}) error

type MultiRuleGroups

type MultiRuleGroups struct {
	Values []rulefmt.RuleGroups
}

type PrometheusQuery

type PrometheusQuery struct {
	Expr  string `json:"expr"`
	Hide  bool   `json:"hide"`
	RefId string `json:"refId"`
}

PrometheusQuery represents a Prometheus query.

func (PrometheusQuery) ToJSON

func (p PrometheusQuery) ToJSON() (json.RawMessage, error)

ToJSON marshals the Query into a JSON byte slice

Jump to

Keyboard shortcuts

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