subscriptions

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 5 Imported by: 13

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func SubscribeAnnotationKey

func SubscribeAnnotationKey(trigger string, service string) string

Types

type Annotations

type Annotations map[string]string

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

Jump to

Keyboard shortcuts

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