pagerduty

package
v0.11.6 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultEventBatchInterval = time.Second * 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

func NewEvent added in v0.7.0

func NewEvent(routingKey, owner string, meta *scheduler.Event) Event

type Notifier

type Notifier struct {
	io.Closer
	// contains filtered or unexported fields
}

func NewNotifier

func NewNotifier(ctx context.Context, eventBatchInterval time.Duration, errHandler func(error), pdService PagerDutyService) *Notifier

func (*Notifier) Close

func (s *Notifier) Close() error

func (*Notifier) Notify

func (s *Notifier) Notify(_ context.Context, attr scheduler.NotifyAttrs) error

func (*Notifier) Worker

func (s *Notifier) Worker(ctx context.Context)

type PagerDutyService

type PagerDutyService interface {
	SendAlert(context.Context, Event) error
}

type PagerDutyServiceImpl

type PagerDutyServiceImpl struct{}

func (*PagerDutyServiceImpl) SendAlert

func (*PagerDutyServiceImpl) SendAlert(ctx context.Context, evt Event) error

Jump to

Keyboard shortcuts

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