Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Check ¶
type Check struct {
ID int `db:"id"`
UUID string `db:"uuid"`
CreatedAt time.Time `db:"created_at"`
EditedAt time.Time `db:"edited_at"`
// URL is the URL that this check will monitor.
URL string `db:"url"`
// WebhookURL is the URL that state changes will be POSTed to.
WebhookURL string `db:"webhook_url"`
// WebhookResponseTimeNanoseconds is the last response time of the
// webhook URL in nanoseconds.
WebhookResponseTimeNanoseconds int64 `db:"webhook_response_time_nanoseconds"`
// Every is how often this check will run in seconds.
// (minimum: 60, maximum: 600)
Every int `db:"every"`
// PlaybookURL is a URL for operations staff to respond to downtime of
// the service that is backed by the URL above.
PlaybookURL string `db:"playbook_url"`
// State is the check's last known state.
State string `db:"state"`
}
Check is an individual HTTP check that gets scheduled every so often.
type Checks ¶
type Checks interface {
Create(ctx context.Context, c Check) (*Check, error)
Delete(ctx context.Context, cid string) (*Check, error)
Get(ctx context.Context, cid string) (*Check, error)
ListByEveryValue(ctx context.Context, time int) ([]Check, error)
List(ctx context.Context, count, offset int) ([]Check, error)
Put(ctx context.Context, c Check) (*Check, error)
}
Checks is the set of calls that can be made to the database regarding checks
func ChecksPostgres ¶
type RunInfo ¶
type RunInfo struct {
ID int `db:"id"`
UUID string `db:"uuid"`
CreatedAt time.Time `db:"created_at"`
RunID string `db:"run_id"`
CheckID string `db:"check_id"`
ResponseStatus int `db:"response_status"`
ResponseTimeNanoseconds int64 `db:"response_time_nanoseconds"`
WebhookResponseTimeNanoseconds int64 `db:"webhook_response_time_nanoseconds"`
}
Click to show internal directories.
Click to hide internal directories.