Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewController ¶
func NewController( client dynamic.NamespaceableResourceInterface, informer cache.SharedIndexInformer, apiFactory api.Factory, opts ...Opts, ) *notificationController
func StateItemKey ¶
func StateItemKey(trigger string, conditionResult triggers.ConditionResult, dest services.Destination) string
Types ¶
type MetricsRegistry ¶
type MetricsRegistry struct { *prometheus.Registry // contains filtered or unexported fields }
func NewMetricsRegistry ¶
func NewMetricsRegistry(prefix string) *MetricsRegistry
func (*MetricsRegistry) IncDeliveriesCounter ¶
func (r *MetricsRegistry) IncDeliveriesCounter(trigger string, service string, succeeded bool)
func (*MetricsRegistry) IncTriggerEvaluationsCounter ¶
func (r *MetricsRegistry) IncTriggerEvaluationsCounter(name string, triggered bool)
type NotificationController ¶
type NotificationController interface {
Run(threadiness int, stopCh <-chan struct{})
}
type NotificationsState ¶
NotificationsState track notification triggers state (already notified/not notified)
func NewState ¶
func NewState(val string) NotificationsState
func NewStateFromRes ¶
func NewStateFromRes(res metav1.Object) NotificationsState
func (NotificationsState) SetAlreadyNotified ¶
func (s NotificationsState) SetAlreadyNotified(trigger string, result triggers.ConditionResult, dest services.Destination, isNotified bool) bool
SetAlreadyNotified set the state of given trigger/destination and return if state has been changed
type Opts ¶
type Opts func(ctrl *notificationController)
func WithAlterDestinations ¶
func WithAlterDestinations(f func(obj v1.Object, destinations services.Destinations, cfg api.Config) services.Destinations) Opts
func WithMetricsRegistry ¶
func WithMetricsRegistry(r *MetricsRegistry) Opts
func WithToUnstructured ¶
func WithToUnstructured(f func(obj v1.Object) (*unstructured.Unstructured, error)) Opts
Click to show internal directories.
Click to hide internal directories.