monitor

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package monitor contains the Github Status monitor.

The monitor will observe the output from the Github Status API and report any detected differences to configured notifiers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

Monitor will periodically poll the Github Status and issues updates to the given callback.

func New

func New(log *zap.Logger, clock clockwork.Clock, client ghstatus.Client, notifyOnFirstRun bool) *Monitor

New creates a new Github Status monitor.

func (*Monitor) MonitorAndNotify

func (m *Monitor) MonitorAndNotify(ctx context.Context, timeBetweenPolls time.Duration)

MonitorAndNotify will monitor the Github Status and notify subscribers upon relevant changes.

func (*Monitor) RegisterNotifier

func (m *Monitor) RegisterNotifier(notifier notifier.Notifier) error

RegisterNotifier will register a notifier with the monitor.

Jump to

Keyboard shortcuts

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