monitor

package
v0.0.0-...-20583e8 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const THRESHOLD = 3

Variables

This section is empty.

Functions

This section is empty.

Types

type URLMonitor

type URLMonitor struct {
	Name   string
	Status []bool
	Ttfb   int
	Code   int
	URL    string
}

URLMonitor This struct handles status of each url

func (*URLMonitor) GetCurrentStatus

func (monitor *URLMonitor) GetCurrentStatus() (bool, int, int, bool)

func (*URLMonitor) IsReady

func (monitor *URLMonitor) IsReady() bool

func (*URLMonitor) MarshalJSON

func (monitor *URLMonitor) MarshalJSON() ([]byte, error)

func (*URLMonitor) PushStatus

func (monitor *URLMonitor) PushStatus(status bool, ttfb int, code int)

func (*URLMonitor) StatusChanged

func (monitor *URLMonitor) StatusChanged() bool

Jump to

Keyboard shortcuts

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