pagerdutyplugin

package
v0.0.0-...-5d8c6d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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 struct {
	Href string `json:"href"`
	Text string `json:"text"`
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL