api

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const API_URL = "https://updown.io/api/checks"

API is API URL

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API is API client struct

func NewClient

func NewClient(apiKey string) *API

func (*API) GetApdex

func (api *API) GetApdex(token string) (*Apdex, error)

GetApdex fetches apdex info from updown API

func (*API) GetStatus

func (api *API) GetStatus(token string) (*Status, error)

GetStatus fetches status info from updown API

func (*API) SetUserAgent

func (api *API) SetUserAgent(app, version string)

SetUserAgent set user-agent string based on app name and version

type Apdex

type Apdex struct {
	Value float64 `json:"apdex"`
}

Apdex contains apdex (Application Performance Index) info

type Status

type Status struct {
	Uptime float64 `json:"uptime"`
	IsDown bool    `json:"down"`
}

Status contains info about check

Jump to

Keyboard shortcuts

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