Documentation ¶
Index ¶
- type AlarmStore
- type FailedEgressIP
- type PrometheusLinkedAlarmStore
- func (s PrometheusLinkedAlarmStore) AddAlarm(namespace string, ips []*net.IP)
- func (s PrometheusLinkedAlarmStore) GetFailed() map[string]*FailedEgressIP
- func (s PrometheusLinkedAlarmStore) RemoveAlarm(namespace string)
- func (s PrometheusLinkedAlarmStore) RemoveAlarmForIP(namespace string, ip *net.IP)
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 ¶
func (s PrometheusLinkedAlarmStore) GetFailed() map[string]*FailedEgressIP
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.
Click to show internal directories.
Click to hide internal directories.