controller

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationPrefix = "notifications.argoproj.io"
)
View Source
const (
	NotifiedAnnotationKey = "notified." + AnnotationPrefix
)

Variables

This section is empty.

Functions

func StateItemKey

func StateItemKey(trigger string, conditionResult triggers.ConditionResult, dest services.Destination) string

func SubscribeAnnotationKey

func SubscribeAnnotationKey(trigger string, service string) string

Types

type NotificationsState

type NotificationsState map[string]int64

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) Persist

func (s NotificationsState) Persist(res metav1.Object) error

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 Subscriptions

type Subscriptions map[string]string

func (Subscriptions) GetAll

func (a Subscriptions) GetAll(defaultTriggers ...string) pkg.Subscriptions

func (Subscriptions) Has

func (a Subscriptions) Has(service string, recipient string) bool

func (Subscriptions) Subscribe

func (a Subscriptions) Subscribe(trigger string, service string, recipients ...string)

func (Subscriptions) Unsubscribe

func (a Subscriptions) Unsubscribe(trigger string, service string, recipient string)

Jump to

Keyboard shortcuts

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