uptime

package
v0.0.0-...-414c732 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AlpacaTarget        = "alpaca"
	UptimeCounterKey    = "uptime_cnt"
	UptimeStatusOk      = "Ok"
	UptimeIndexTemplate = "uptime_%s_%d"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlpacaSettingModel

type AlpacaSettingModel struct {
	Environment  string `json:"environment"`
	Organization string `json:"organization"`
	Username     string `json:"username"`
	Password     string `json:"password"`
	Alert        int64  `json:"alert"`
}

type Target

type Target interface {
	ListJobs() map[string]func(cancelChan chan bool)

	Scan(id int64, kwargs url.Values) error
	Setup() error
	Destroy() error
	Health() bool
}

func NewAlpacaUptime

func NewAlpacaUptime(
	browser playwright.Browser,
	timeout time.Duration,
	broker telegram.Telegram,
	dbConfig string,
) Target

type Uptime

type Uptime interface {
	container.RestModule
	container.CronModule
}

func NewModule

func NewModule(
	dbConfig string,
	retry int,
	intervalTimeOfEachCron int,
) (Uptime, error)

type UptimeStatus

type UptimeStatus int
const (
	UptimeExpired UptimeStatus = iota
	UptimeOk
	UptimeError
	UptimeFailed
	UptimePending
)

Jump to

Keyboard shortcuts

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