pagerduty

package
v0.6.0-rc.12 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 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
}

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