alerting

package
v0.0.0-...-5c26a86 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, alertc chan string, websitesMap map[string]int64, alertConfig AlertConfig) error

Run monitors the availability of websites It send an alert to the dashboard, if the availability of some website over a given interval is bellow the given the threshold

Types

type AlertConfig

type AlertConfig struct {
	AvailabilityInterval  int64   `json:"availabilityInterval"`
	AvailabilityThreshold float64 `json:"availabilityThreshold"`
	CheckInterval         int     `json:"checkInterval"`
}

AlertConfig represents all the useful info for our alert logic

Jump to

Keyboard shortcuts

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