kube

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventCallback

func EventCallback(vault *vault.MetricsVault, omitEventsMessages bool) func(obj interface{})

EventCallback generates the handler to connect prometheus metrics vault to the shared event informer.

func EventMapping

func EventMapping(ttl time.Duration) vault.Mapping

EventMapping creates the mapping for the prometheus metrics vault. The order of the labels here should match the one from the sample converter function.

func EventToSample

func EventToSample(event *v1.Event, omitEventsMessages bool) vault.Sample

EventToSample converts Kubernetes core v1.Event to the prometheus metric sample.

Types

type EventsInformer

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

EventsInformer handles Kubernetes events. The is the shim between metrics storage and Kubernetes cluster.

func NewEventsInformer

func NewEventsInformer(kubeconfigPath, fieldSelector string, handler func(object interface{})) (*EventsInformer, error)

NewEventsInformer creates cached informer to track events from a Kubernetes cluster.

func (*EventsInformer) Run

func (e *EventsInformer) Run(stopCh <-chan struct{}, errorCh chan<- error)

Run starts the informer with various handlers and waits for the first cache synchronization.

Jump to

Keyboard shortcuts

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