metrics

package
v0.0.0-...-24ed54c Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlarmStore

type AlarmStore interface {
	// Adds a failed namespace to the alarm store
	AddAlarm(namespace string, ips []*net.IP)

	// Removes a recovered namespace from the alarm store
	RemoveAlarm(namespace string)

	RemoveAlarmForIP(namespace string, ip *net.IP)

	// Retrieves all failed namespaces from the alarm store
	GetFailed() map[string]*FailedEgressIP
}

AlarmStore -- the store for keeping alarms of the aws-egress-ip-operator

func NewAlarmStore

func NewAlarmStore(logger logr.Logger) *AlarmStore

NewAlarmStore -- creates the default implementation of the alarm store

type FailedEgressIP

type FailedEgressIP struct {
	Namespace       string    // The failed namespace
	FailedIPs       []*net.IP // The failed IPs
	FirstOccurrence time.Time // First occurrence of this failure
	LastOccurrence  time.Time // Last occurrence of this failure
	Counter         float64   // Failure counter
}

FailedEgressIP - This is the data for the failure.

type PrometheusLinkedAlarmStore

type PrometheusLinkedAlarmStore struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

PrometheusLinkedAlarmStore -- a simple in memory implementation of the AlarmStore

func (PrometheusLinkedAlarmStore) AddAlarm

func (s PrometheusLinkedAlarmStore) AddAlarm(namespace string, ips []*net.IP)

AddAlarm -- Adds a failed namespace to the alarm store

func (PrometheusLinkedAlarmStore) GetFailed

GetFailed -- Retrieves all failed namespaces from the alarm store

func (PrometheusLinkedAlarmStore) RemoveAlarm

func (s PrometheusLinkedAlarmStore) RemoveAlarm(namespace string)

RemoveAlarm -- Removes a recovered namespace from the alarm store

func (PrometheusLinkedAlarmStore) RemoveAlarmForIP

func (s PrometheusLinkedAlarmStore) RemoveAlarmForIP(namespace string, ip *net.IP)

RemoveAlarmForIP -- Removes the alarm for a single IP. If there are still IPs in alarm, keep the alarm, if that has been the last IP, remove the alarm.

Jump to

Keyboard shortcuts

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