Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SendGridAlerter ¶
type SendGridAlerter struct {
// contains filtered or unexported fields
}
SendGridAlerter implements an Alerter interface via the SendGrid API. It is responsible for sending alerts to given recipient email and SMS addresses.
func NewSendGridAlerter ¶
func NewSendGridAlerter(logger core.Logger, apiKey, fromName string, recipients []string) SendGridAlerter
NewSendGridAlerter returns a new SendGridAlerter.
func (SendGridAlerter) Alert ¶
func (sga SendGridAlerter) Alert(payload []byte, memo string) error
Alert implements the Alerter interface. It will send an email (or SMS message) with a given payload (body) to a series of recipients. If any send fails, an error will be immediately returned.
TODO: Investigate parallelizing sending messages.
func (SendGridAlerter) AlertWithRecipients ¶
func (sga SendGridAlerter) AlertWithRecipients(payload []byte, memo string, recipients []string) error
AlertWithRecipients attempts to send a message to a series of recipients via the SendGrid API. If any send fails, an error will be immediately returned.
TODO: Investigate parallelizing sending messages.
func (SendGridAlerter) Name ¶ added in v0.0.2
func (sga SendGridAlerter) Name() string
Name implements the Alerter interface. It returns the name of the alerter.