subscriptions

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NotifiedAnnotationKey added in v0.4.0

func NotifiedAnnotationKey() string

func SetAnnotationPrefix added in v0.4.0

func SetAnnotationPrefix(prefix string)

SetAnnotationPrefix sets the annotationPrefix to the provided string. defaults to "notifications.argoproj.io"

func SubscribeAnnotationKey

func SubscribeAnnotationKey(trigger string, service string) string

Types

type Annotations

type Annotations map[string]string

func NewAnnotations added in v0.3.0

func NewAnnotations(annotations map[string]string) Annotations

func (Annotations) GetDestinations

func (a Annotations) GetDestinations(defaultTriggers []string, serviceDefaultTriggers map[string][]string) services.Destinations

func (Annotations) Has

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

func (Annotations) Subscribe

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

func (Annotations) Unsubscribe

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

type DefaultSubscription

type DefaultSubscription struct {
	// Recipients comma separated list of recipients
	Recipients []string
	// Optional trigger name
	Triggers []string
	// Options label selector that limits applied applications
	Selector labels.Selector
}

DefaultSubscription holds recipients that receives notification by default.

func (*DefaultSubscription) MarshalJSON

func (s *DefaultSubscription) MarshalJSON() ([]byte, error)

func (*DefaultSubscription) MatchesTrigger

func (s *DefaultSubscription) MatchesTrigger(trigger string) bool

func (*DefaultSubscription) UnmarshalJSON

func (s *DefaultSubscription) UnmarshalJSON(data []byte) error

type DefaultSubscriptions

type DefaultSubscriptions []DefaultSubscription

type Destination added in v0.4.0

type Destination struct {
	Service    string   `json:"service"`
	Recipients []string `json:"recipients"`
}

Destination holds notification destination details

type Subscription added in v0.4.0

type Subscription struct {
	Trigger      []string
	Destinations []Destination
}

Jump to

Keyboard shortcuts

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