Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByResponseTime ¶
type ByResponseTime struct { Under125 uint `json:"under125"` Under250 uint `json:"under250"` Under500 uint `json:"under500"` Under1000 uint `json:"under1000"` Under2000 uint `json:"under2000"` Under4000 uint `json:"under4000"` }
ByResponseTime is a type that represents the ByResponseTime subtype of Requests
func (*ByResponseTime) ToBuckets ¶
func (x *ByResponseTime) ToBuckets() map[float64]uint64
ToBuckets is a method that converts ByResponseTIme structs into Prometheus buckets
type Check ¶
type Check struct { Token string `json:"token"` URL string `json:"url"` Alias string `json:"alias"` LastStatus uint16 `json:"last_status"` Uptime float32 `json:"uptime"` Down bool `json:"down"` DownSince string `json:"down_since"` Error string `json:"error"` Period uint `json:"period"` ApdexThreshold float32 `json:"apdex_t"` Enabled bool `json:"enabled"` Published bool `json:"published"` DisabledLocations []string `json:"disabled_locations"` Recipients []string `json:"recipients"` LastCheckAt string `json:"last_check_at"` NextCheckAt string `json:"next_check_at"` SSL SSL `json:"ssl"` }
Check is a type that represents an updown Check
type Client ¶
Client is a type that represents an updown (REST) client
func (*Client) GetCheckMetrics ¶
GetCheckMetrics is a method that returns a list of updown metrics for a check The method implemnents updown's /api/checks/:token/metrics See: https://updown.io/api#GET-/api/checks/:token/metrics
type Metrics ¶
type Metrics struct { Apdex float32 `json:"apdex"` Requests Requests `json:"requests"` Timings Timings `json:"timings"` }
Metrics is a type that an updown Check's metrics
type Requests ¶
type Requests struct { Samples uint `json:"samples"` Failures uint `json:"failures"` Satisfied uint `json:"satisfied"` Tolerated uint `json:"tolerated"` ByResponseTime ByResponseTime `json:"by_response_time"` }
Requests is a type that represents the Requests subtype of updown Metrics
type SSL ¶
type SSL struct { TestedAt string `json:"tested_at"` ExpiresAt string `json:"expires_at"` Valid bool `json:"valid"` Error string `json:"error"` }
SSL is a type that represents the SSL subtype of an updown Check
type Timings ¶
type Timings struct { Redirect uint `json:"redirect"` NameLookup uint `json:"namelookup"` Connection uint `json:"connection"` Handshake uint `json:"handshake"` Response uint `json:"response"` Total uint `json:"total"` }
Timings is a type that represents the Timings subtype of updown Metrics