record

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NotificationConfigMap = "argo-rollouts-notification-configmap"
	NotificationSecret    = "argo-rollouts-notification-secret"
)

Variables

This section is empty.

Functions

func NewAPIFactorySettings added in v1.1.0

func NewAPIFactorySettings() api.Settings

func NewFakeApiFactory added in v1.2.0

func NewFakeApiFactory() api.Factory

Types

type EventOptions

type EventOptions struct {
	// EventType is the kubernetes event type (Normal or Warning). Defaults to Normal
	EventType string
	// EventReason is a Kubernetes EventReason of why this event is generated.
	// Reason should be short and unique; it  should be in UpperCamelCase format (starting with a
	// capital letter). "reason" will be used to automate handling of events, so imagine people
	// writing switch statements to handle them.
	EventReason string
}

type EventRecorder

type EventRecorder interface {
	Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{})
	Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{})
	K8sRecorder() record.EventRecorder
}

func NewEventRecorder

func NewEventRecorder(kubeclientset kubernetes.Interface, rolloutEventCounter *prometheus.CounterVec, notificationFailedCounter *prometheus.CounterVec, notificationSuccessCounter *prometheus.CounterVec, notificationSendPerformance *prometheus.HistogramVec, apiFactory api.Factory) EventRecorder

type EventRecorderAdapter

type EventRecorderAdapter struct {
	// Recorder is a K8s EventRecorder
	Recorder record.EventRecorder
	// RolloutEventCounter is a counter to increment on events
	RolloutEventCounter *prometheus.CounterVec
	// NotificationFailCounter is a counter to increment on failing to send notifications
	NotificationFailedCounter *prometheus.CounterVec
	// NotificationSuccessCounter is a counter to increment on successful send notifications
	NotificationSuccessCounter  *prometheus.CounterVec
	NotificationSendPerformance *prometheus.HistogramVec
	// contains filtered or unexported fields
}

EventRecorderAdapter implements the EventRecorder interface

func (*EventRecorderAdapter) Eventf

func (e *EventRecorderAdapter) Eventf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{})

func (*EventRecorderAdapter) K8sRecorder

func (e *EventRecorderAdapter) K8sRecorder() record.EventRecorder

func (*EventRecorderAdapter) Warnf

func (e *EventRecorderAdapter) Warnf(object runtime.Object, opts EventOptions, messageFmt string, args ...interface{})

type FakeEventRecorder

type FakeEventRecorder struct {
	EventRecorderAdapter
	Events []string
}

FakeEventRecorder wraps EventRecorderAdapter but with a convenience function to get all the event reasons which were emitted

func NewFakeEventRecorder

func NewFakeEventRecorder() *FakeEventRecorder

Jump to

Keyboard shortcuts

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