checks

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitStorage

func InitStorage()

func PerformCheck

func PerformCheck(bot *tgbotapi.BotAPI, chatId int64, alertThreshold int)

func SaveChecksData

func SaveChecksData(checksData Data) error

Types

type Data

type Data struct {
	HealthChecks map[string]ServerCheck `json:"healthChecks"`
}

func ReadChecksData

func ReadChecksData() Data

type ServerCheck

type ServerCheck struct {
	Name        string    `json:"name"`
	Url         string    `json:"url"`
	LastFailure time.Time `json:"lastFailure"`
	LastSuccess time.Time `json:"lastSuccess"`
	IsOk        bool      `json:"isOk"`
}

Jump to

Keyboard shortcuts

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