Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a Better Stack API client.
func (*Client) FetchHeartbeats ¶
FetchHeartbeats retrieves all heartbeats from Better Stack.
type Heartbeat ¶
type Heartbeat struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes HeartbeatAttributes `json:"attributes"`
}
Heartbeat represents a Better Stack heartbeat.
type HeartbeatAttributes ¶
type HeartbeatAttributes struct {
Name string `json:"name"`
Period int `json:"period"`
Grace int `json:"grace"`
Paused bool `json:"paused"`
}
HeartbeatAttributes contains heartbeat configuration.
type HeartbeatsResponse ¶
type HeartbeatsResponse struct {
Data []Heartbeat `json:"data"`
Pagination Pagination `json:"pagination"`
}
HeartbeatsResponse is the API response for listing heartbeats.
type Monitor ¶
type Monitor struct {
ID string `json:"id"`
Type string `json:"type"`
Attributes MonitorAttributes `json:"attributes"`
}
Monitor represents a Better Stack monitor.
type MonitorAttributes ¶
type MonitorAttributes struct {
PronouncableName string `json:"pronounceable_name"`
URL string `json:"url"`
MonitorType string `json:"monitor_type"`
CheckFrequency int `json:"check_frequency"`
RequestTimeout int `json:"request_timeout"`
RequestMethod string `json:"request_method"`
RequestHeaders []RequestHeader `json:"request_headers"`
RequestBody string `json:"request_body"`
ExpectedStatusCodes []int `json:"expected_status_codes"`
FollowRedirects bool `json:"follow_redirects"`
Paused bool `json:"paused"`
MonitorGroupID int `json:"monitor_group_id"`
Regions []string `json:"regions"`
Port int `json:"port,omitempty"`
}
MonitorAttributes contains monitor configuration.
type MonitorsResponse ¶
type MonitorsResponse struct {
Data []Monitor `json:"data"`
Pagination Pagination `json:"pagination"`
}
MonitorsResponse is the API response for listing monitors.
type Pagination ¶
type Pagination struct {
First string `json:"first"`
Last string `json:"last"`
Prev string `json:"prev"`
Next string `json:"next"`
}
Pagination contains pagination metadata.
type RequestHeader ¶
RequestHeader represents an HTTP request header.
Click to show internal directories.
Click to hide internal directories.