observer

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmitK8sEvent

func EmitK8sEvent(recorder record.EventRecorder, object runtime.Object, eventtype, reason, messageFmt string)

func NewCondition

func NewCondition(e *esv1alpha1.Elastalert, flag string) *metav1.Condition

func UpdateElastalertStatus

func UpdateElastalertStatus(c client.Client, ctx context.Context, e *esv1alpha1.Elastalert, flag string) error

func UpdateStatus

func UpdateStatus(c client.Client, ctx context.Context, e *esv1alpha1.Elastalert, condition *metav1.Condition) error

Types

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) Observe

func (m *Manager) Observe(elastalert *esv1alpha1.Elastalert, c client.Client, recorder record.EventRecorder) *Observer

func (*Manager) StopObserving

func (m *Manager) StopObserving(key types.NamespacedName)

type Observer

type Observer struct {
	ObservationInterval time.Duration
	// contains filtered or unexported fields
}

Observer regularly check the health of elastalert deployment in a thread-safe way

func NewObserver

func NewObserver(c client.Client, elastalert types.NamespacedName, interval time.Duration, recorder record.EventRecorder) *Observer

NewObserver creates and starts an Observer

func (*Observer) Start

func (o *Observer) Start()

Start the observer in a separate goroutine

func (*Observer) Stop

func (o *Observer) Stop()

Stop the observer loop

Jump to

Keyboard shortcuts

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