Provides constructors and predicates for check results.
Provides constructors and predicates for check results.
(healthy)
(healthy extra-data)
Constructs a healthy result.
The optional map of extra data is stored with the result for future use.
Unless overridden in the extra data map, an :evaluated-at
field is added to
the result, set to the current date time in the system default time zone.
Constructs a healthy result. The optional map of extra data is stored with the result for future use. Unless overridden in the extra data map, an `:evaluated-at` field is added to the result, set to the current date time in the system default time zone.
(healthy? result)
Returns true
if the result has a :healthy
status, false
otherwise.
Returns `true` if the result has a `:healthy` status, `false` otherwise.
(outdated? result check)
(outdated? result check relative-to)
Returns true
if the result of the check is outdated, false
otherwise.
A result is considered outdated if its time-to-live (TTL) has expired,
i.e., if its evaluation date time is before the current date time
minus the TTL. If relative-to
is provided, the calculation is
performed relative to that date time rather than to the current date
time.
Note: the result of a realtime check is always considered outdated.
Returns `true` if the result of the check is outdated, `false` otherwise. A result is considered outdated if its time-to-live (TTL) has expired, i.e., if its evaluation date time is before the current date time minus the TTL. If `relative-to` is provided, the calculation is performed relative to that date time rather than to the current date time. Note: the result of a realtime check is always considered outdated.
(result status)
(result status {:keys [evaluated-at] :or {evaluated-at (t/now)} :as extra-data})
Constructs a result with the provided status
.
The optional map of extra data is stored with the result for future use.
Unless overridden in the extra data map, an :evaluated-at
field is added to
the result, set to the current date time in the system default time zone.
Constructs a result with the provided `status`. The optional map of extra data is stored with the result for future use. Unless overridden in the extra data map, an `:evaluated-at` field is added to the result, set to the current date time in the system default time zone.
(unhealthy)
(unhealthy extra-date)
Constructs an unhealthy result.
The optional map of extra data is stored with the result for future use.
Unless overridden in the extra data map, an :evaluated-at
field is added to
the result, set to the current date time in the system default time zone.
Constructs an unhealthy result. The optional map of extra data is stored with the result for future use. Unless overridden in the extra data map, an `:evaluated-at` field is added to the result, set to the current date time in the system default time zone.
(unhealthy? result)
Returns true
if the result has an :unhealthy
status, false
otherwise.
Returns `true` if the result has an `:unhealthy` status, `false` otherwise.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close