pagerduty

package
v0.0.0-...-c18b771 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PagerDutyAlert

type PagerDutyAlert struct {
	RoutingKey string           `json:"routing_key"`
	Action     string           `json:"event_action"`
	Payload    PagerDutyPayload `json:"payload,omitempty"`
}

func NewPagerDutyAlert

func NewPagerDutyAlert(routing_key string, action string, payload PagerDutyPayload) PagerDutyAlert

func (*PagerDutyAlert) Post

func (msg *PagerDutyAlert) Post(url string) error

func (*PagerDutyAlert) Serialize

func (msg *PagerDutyAlert) Serialize() []byte

type PagerDutyConfig

type PagerDutyConfig struct {
	Topic          string `json:"topic"`
	Severity       string `json:"severity"`
	IntegrationKey string `json:"integration_key"`
	URL            string `json:"url"`
}

func (*PagerDutyConfig) Start

func (config *PagerDutyConfig) Start(queue <-chan timestamped_message.TimestampedMessage)

type PagerDutyPayload

type PagerDutyPayload struct {
	Summary   string      `json:"summary"`
	Source    string      `json:"source"`
	Severity  string      `json:"severity"`
	Timestamp string      `json:"timestamp,omitempty"`
	Component string      `json:"component,omitempty"`
	Group     string      `json:"group,omitempty"`
	Class     string      `json:"class,omitempty"`
	Details   interface{} `json:"custom_details,omitempty"`
}

func NewPagerDutyPayload

func NewPagerDutyPayload(timestamp time.Time, topic string, message string, severity string) PagerDutyPayload

Jump to

Keyboard shortcuts

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