Skip to content

Commit 147f65c

Browse files
committed
feat: add configurable check interval, default is 1 minute - polishing
1 parent 44ef671 commit 147f65c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/model/check.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ type UptimeCheck struct {
3131
Name string `json:"name"`
3232
URL string `json:"url"`
3333
Tags []string `json:"tags"`
34-
Resolution int `json:"resolution"`
34+
Interval int `json:"resolution"`
3535
RequestHeaders map[string]string `json:"request_headers"` //nolint:tagliatelle // grandfathered in
3636
StringContains string `json:"string_contains"` //nolint:tagliatelle // grandfathered in
3737
StringNotContains string `json:"string_not_contains"` //nolint:tagliatelle // grandfathered in
@@ -59,7 +59,7 @@ func NewUptimeCheck(ingressName string, annotations map[string]string) (*UptimeC
5959
Name: name,
6060
URL: url,
6161
Tags: stringToSlice(annotations[AnnotationTags]),
62-
Resolution: interval,
62+
Interval: interval,
6363
RequestHeaders: kvStringToMap(annotations[AnnotationRequestHeaders]),
6464
StringContains: annotations[AnnotationStringContains],
6565
StringNotContains: annotations[AnnotationStringNotContains],

internal/service/providers/pingdom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ func (m *PingdomUptimeProvider) checkToJSON(check model.UptimeCheck, includeType
213213
"url": relativeURL,
214214
"encryption": true, // assume all checks run over HTTPS
215215
"port": port,
216-
"resolution": check.Resolution,
216+
"resolution": check.Interval,
217217
"tags": check.Tags,
218218
}
219219
if includeType {

0 commit comments

Comments
 (0)