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() error
// 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...
Source Files
¶
- emailer.go
- processor.go
- publisher.go
Click to show internal directories.
Click to hide internal directories.