Documentation
¶
Overview ¶
Package pagerduty provides a simple interface to send alerts to a specific service
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a wrapper for the pagerduty client
func (*Client) EventAction ¶
func (c *Client) EventAction(detail *cw.EventDetails) string
EventAction returns the pagerduty action we'll take based on the Cloudwatch alarm
func (*Client) SubmitEvent ¶
func (c *Client) SubmitEvent(routingKey string, detail *cw.EventDetails) error
SubmitEvent sends an event to PagerDuty using alarm details from cloudwatch - note: some logic here - it will change the PagerDuty action based on the current cw alarm status
type ClientOptions ¶
type ClientOptions func(*Client)
ClientOptions provides the method to configure the new client
func WithPDAPIClient ¶
func WithPDAPIClient(pd PDAPIClientInterface) ClientOptions
WithPDAPIClient allows overriding the pdapi client
type PDAPIClientInterface ¶
type PDAPIClientInterface interface {
ManageEvent(pdapi.V2Event) (*pdapi.V2EventResponse, error)
}
PDAPIClientInterface is an interface for the purpose of overriding the pagerduty client behaviour
Click to show internal directories.
Click to hide internal directories.