implementations

package
v1.1.38 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 23 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Task          = "task"
	Node          = "node"
	Workflow      = "workflow"
	AllTypes      = "all"
	AllTypesShort = "*"
)

Variables

View Source
var SupportedEvents = map[string]string{
	Task:     proto.MessageName(&taskExecutionReq),
	Node:     proto.MessageName(&nodeExecutionReq),
	Workflow: proto.MessageName(&workflowExecutionReq),
}

Functions

func FlyteEmailToSesEmailInput added in v0.3.38

func FlyteEmailToSesEmailInput(email admin.EmailMessage) ses.SendEmailInput

func NewEventsPublisher added in v0.3.38

func NewEventsPublisher(pub pubsub.Publisher, scope promutils.Scope, eventTypes []string) interfaces.Publisher

func NewGcpProcessor added in v0.6.33

func NewGcpProcessor(sub pubsub.Subscriber, emailer interfaces.Emailer, scope promutils.Scope) interfaces.Processor

func NewNoopEmail

func NewNoopEmail() interfaces.Emailer

func NewNoopProcess

func NewNoopProcess() interfaces.Processor

func NewNoopPublish

func NewNoopPublish() interfaces.Publisher

func NewProcessor

func NewProcessor(sub pubsub.Subscriber, emailer interfaces.Emailer, scope promutils.Scope) interfaces.Processor

func NewPublisher

func NewPublisher(pub pubsub.Publisher, scope promutils.Scope) interfaces.Publisher

func NewSendGridEmailer added in v0.5.11

func NewSendGridEmailer(config runtimeInterfaces.NotificationsConfig, scope promutils.Scope) interfaces.Emailer

Types

type AwsEmailer

type AwsEmailer struct {
	// contains filtered or unexported fields
}

func (*AwsEmailer) SendEmail

func (e *AwsEmailer) SendEmail(ctx context.Context, email admin.EmailMessage) error

type EventPublisher added in v0.3.38

type EventPublisher struct {
	// contains filtered or unexported fields
}

TODO: Add a counter that encompasses the publisher stats grouped by project and domain.

func (*EventPublisher) Publish added in v0.3.38

func (p *EventPublisher) Publish(ctx context.Context, notificationType string, msg proto.Message) error

The key is the notification type as defined as an enum.

type EventPublisherSystemMetrics added in v0.6.135

type EventPublisherSystemMetrics struct {
	Scope          promutils.Scope
	PublishTotal   prometheus.Counter
	PublishSuccess prometheus.Counter
	PublishError   prometheus.Counter
}

func NewEventPublisherSystemMetrics added in v0.6.135

func NewEventPublisherSystemMetrics(scope promutils.Scope) EventPublisherSystemMetrics

type ExternalEmailer added in v0.5.11

type ExternalEmailer = string
const (
	Sendgrid ExternalEmailer = "sendgrid"
)

type GcpProcessor added in v0.6.33

type GcpProcessor struct {
	// contains filtered or unexported fields
}

TODO: Add a counter that encompasses the publisher stats grouped by project and domain.

func (*GcpProcessor) StartProcessing added in v0.6.33

func (p *GcpProcessor) StartProcessing()

func (*GcpProcessor) StopProcessing added in v0.6.33

func (p *GcpProcessor) StopProcessing() error

type NoopEmail

type NoopEmail struct{}

Email to use when there is no email configuration.

func (*NoopEmail) SendEmail

func (n *NoopEmail) SendEmail(ctx context.Context, email admin.EmailMessage) error

type NoopProcess

type NoopProcess struct{}

func (*NoopProcess) StartProcessing

func (n *NoopProcess) StartProcessing()

func (*NoopProcess) StopProcessing

func (n *NoopProcess) StopProcessing() error

type NoopPublish

type NoopPublish struct{}

func (*NoopPublish) Publish

func (n *NoopPublish) Publish(ctx context.Context, notificationType string, msg proto.Message) error

type Processor

type Processor struct {
	// contains filtered or unexported fields
}

TODO: Add a counter that encompasses the publisher stats grouped by project and domain.

func (*Processor) StartProcessing

func (p *Processor) StartProcessing()

Currently only email is the supported notification because slack and pagerduty both use email client to trigger those notifications. When Pagerduty and other notifications are supported, a publisher per type should be created.

func (*Processor) StopProcessing

func (p *Processor) StopProcessing() error

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

TODO: Add a counter that encompasses the publisher stats grouped by project and domain.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, notificationType string, msg proto.Message) error

The key is the notification type as defined as an enum.

type SendgridEmailer added in v0.5.11

type SendgridEmailer struct {
	// contains filtered or unexported fields
}

func (SendgridEmailer) SendEmail added in v0.5.11

func (s SendgridEmailer) SendEmail(ctx context.Context, email admin.EmailMessage) error

Jump to

Keyboard shortcuts

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