Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Email ¶
type Email struct {
// contains filtered or unexported fields
}
Email implements the Integration interface and uses SMTP to deliver the notifications
func NewDefaultEmail ¶
NewDefaultEmail returns an email integration with the default settings. The default settings use gmail's smtp and ssl
func (Email) Deliver ¶
func (e Email) Deliver(n *Notification) error
func (Email) StackTraceLines ¶
type Integration ¶
type Integration interface { // StackTraceLines return the number of stack trace lines // to be sent in each notification StackTraceLines() int // Deliver delivers the given notification and returns an error if any. Deliver(*Notification) error }
Integration is the interface used to deliver a notification of a panic
type Notification ¶
type Notification struct { Err error Host string // the machine's hostname Stack []string Request *Request }
Notification contains information about what caused the panic
type SMTPConfig ¶
SMTPConfig contains the SMTP configuration
type Slack ¶
type Slack struct {
// contains filtered or unexported fields
}
Slack implements the Integration interface and uses Slack's Incoming Webhooks API to deliver the notifications
func (Slack) Deliver ¶
func (s Slack) Deliver(n *Notification) error
func (*Slack) SetHTTPClient ¶
SetHTTPClient sets the http.Client used to deliver the notification
func (Slack) StackTraceLines ¶
type WebHook ¶
WebHook implements the Integration interface and delivers the notifications over the HTTP protocol
func (WebHook) Deliver ¶
func (w WebHook) Deliver(n *Notification) error