pdscrape

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EscalationTeam added in v0.1.5

type EscalationTeam struct {
	EscalationName string
	TeamName       string
	ID             string
}

func (EscalationTeam) MarshalText added in v0.1.5

func (a EscalationTeam) MarshalText() (text []byte, err error)

type IncidentCounts

type IncidentCounts struct {
	Triggered    int
	Acknowledged int
	Resolved     int
}

type IncidentStatus added in v0.1.6

type IncidentStatus string

func (IncidentStatus) String added in v0.1.6

func (i IncidentStatus) String() string

type PdScrape

type PdScrape struct {
	Client           *pagerduty.Client
	Log              *zapctx.Logger
	LookbackDuration time.Duration
	// contains filtered or unexported fields
}

func (*PdScrape) Availabilities

func (p *PdScrape) Availabilities(ctx context.Context, lookback time.Duration) (map[string]time.Duration, error)

func (*PdScrape) CreateGather

func (p *PdScrape) CreateGather(timeRange time.Duration) prometheus.Gatherer

func (*PdScrape) IncidentCounts

func (p *PdScrape) IncidentCounts(ctx context.Context, lookback time.Duration) (map[string]IncidentCounts, error)

func (*PdScrape) IncidentCountsByEscalationTeam added in v0.1.5

func (p *PdScrape) IncidentCountsByEscalationTeam(ctx context.Context, lookback time.Duration) (map[EscalationTeam]IncidentCounts, error)

func (*PdScrape) Init

func (p *PdScrape) Init(ctx context.Context, token string) error

func (*PdScrape) Scrape

func (p *PdScrape) Scrape(ctx context.Context) error

Jump to

Keyboard shortcuts

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