Documentation
¶
Index ¶
- type PagerDutyEvent
- type PagerDutyImage
- type PagerDutyLink
- type PagerDutyPayload
- type PagerDutyPlugin
- func (p *PagerDutyPlugin) OnLoad(ctx *plugins.PluginContext) error
- func (p *PagerDutyPlugin) OnSessionCreated(ctx *plugins.PluginContext, session interface{}) error
- func (p *PagerDutyPlugin) OnSessionHibernated(ctx *plugins.PluginContext, session interface{}) error
- func (p *PagerDutyPlugin) OnUnload(ctx *plugins.PluginContext) error
- func (p *PagerDutyPlugin) OnUserCreated(ctx *plugins.PluginContext, user interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PagerDutyEvent ¶
type PagerDutyEvent struct {
RoutingKey string `json:"routing_key"`
EventAction string `json:"event_action"` // trigger, acknowledge, resolve
DedupKey string `json:"dedup_key,omitempty"`
Payload PagerDutyPayload `json:"payload"`
Links []PagerDutyLink `json:"links,omitempty"`
Images []PagerDutyImage `json:"images,omitempty"`
}
PagerDutyEvent represents a PagerDuty Events API v2 event
type PagerDutyImage ¶
type PagerDutyImage struct {
Src string `json:"src"`
Href string `json:"href,omitempty"`
Alt string `json:"alt,omitempty"`
}
PagerDutyImage represents an image in the event
type PagerDutyLink ¶
PagerDutyLink represents a link in the event
type PagerDutyPayload ¶
type PagerDutyPayload struct {
Summary string `json:"summary"`
Source string `json:"source"`
Severity string `json:"severity"` // info, warning, error, critical
Timestamp string `json:"timestamp,omitempty"`
Component string `json:"component,omitempty"`
Group string `json:"group,omitempty"`
Class string `json:"class,omitempty"`
CustomDetails map[string]interface{} `json:"custom_details,omitempty"`
}
PagerDutyPayload represents the event payload
type PagerDutyPlugin ¶
type PagerDutyPlugin struct {
plugins.BasePlugin
// contains filtered or unexported fields
}
PagerDutyPlugin implements PagerDuty incident alerting integration
func NewPagerDutyPlugin ¶
func NewPagerDutyPlugin() *PagerDutyPlugin
NewPagerDutyPlugin creates a new PagerDuty plugin instance
func (*PagerDutyPlugin) OnLoad ¶
func (p *PagerDutyPlugin) OnLoad(ctx *plugins.PluginContext) error
OnLoad is called when the plugin is loaded
func (*PagerDutyPlugin) OnSessionCreated ¶
func (p *PagerDutyPlugin) OnSessionCreated(ctx *plugins.PluginContext, session interface{}) error
OnSessionCreated is called when a session is created
func (*PagerDutyPlugin) OnSessionHibernated ¶
func (p *PagerDutyPlugin) OnSessionHibernated(ctx *plugins.PluginContext, session interface{}) error
OnSessionHibernated is called when a session is hibernated
func (*PagerDutyPlugin) OnUnload ¶
func (p *PagerDutyPlugin) OnUnload(ctx *plugins.PluginContext) error
OnUnload is called when the plugin is unloaded
func (*PagerDutyPlugin) OnUserCreated ¶
func (p *PagerDutyPlugin) OnUserCreated(ctx *plugins.PluginContext, user interface{}) error
OnUserCreated is called when a user is created
Click to show internal directories.
Click to hide internal directories.