prometheus

package
v0.7.18 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMapName = "prometheus-server"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

func NewConfig

func NewConfig() *Config

func (*Config) Delete

func (c *Config) Delete(i *v1.IndicatorDocument)

func (*Config) String

func (c *Config) String() string

String will render out the prometheus config for alert rules.

func (*Config) Upsert

func (c *Config) Upsert(i *v1.IndicatorDocument)

type ConfigMapPatcher

type ConfigMapPatcher interface {
	Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *corev1.ConfigMap, err error)
}

type ConfigRenderer

type ConfigRenderer interface {
	Upsert(i *v1.IndicatorDocument)
	Delete(i *v1.IndicatorDocument)

	fmt.Stringer
}

type Controller

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

func NewController

func NewController(configMap ConfigMapPatcher, cr ConfigRenderer) *Controller

func (*Controller) OnAdd

func (c *Controller) OnAdd(obj interface{})

func (*Controller) OnDelete

func (c *Controller) OnDelete(obj interface{})

func (*Controller) OnUpdate

func (c *Controller) OnUpdate(oldObj, newObj interface{})

Jump to

Keyboard shortcuts

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