interfaces

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: Apache-2.0 Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Emailer

type Emailer interface {
	SendEmail(ctx context.Context, email admin.EmailMessage) error
}

The implementation of Emailer needs to be passed to the implementation of Processor in order for emails to be sent.

type Processor

type Processor interface {

	// Starts processing messages from the underlying subscriber.
	// If the channel closes gracefully, no error will be returned.
	// If the underlying channel experiences errors,
	// an error is returned and the channel is closed.
	StartProcessing()

	// This should be invoked when the application is shutting down.
	// If StartProcessing() returned an error, StopProcessing() will return an error because
	// the channel was already closed.
	StopProcessing() error
}

Exposes the common methods required for a subscriber. There is one ProcessNotification per type.

type Publisher

type Publisher interface {
	// The notification type is inferred from the Notification object in the Execution Spec.
	Publish(ctx context.Context, notificationType string, msg proto.Message) error
}

Publish a notification will differ between different types of notifications using the key The contract requires one subscription per type i.e. one for email one for slack, etc...

Jump to

Keyboard shortcuts

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