Liking cljdoc? Tell your friends :D

salutem.core.results

Provides constructors and predicates for check results.

Provides constructors and predicates for check results.
raw docstring

healthyclj

(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 :salutem/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 `:salutem/evaluated-at` field is
added to the result, set to the current date time in the system default time
zone.
sourceraw docstring

healthy?clj

(healthy? result)

Returns true if the result has a :healthy status, false otherwise.

Returns `true` if the result has a `:healthy` status, `false`
otherwise.
sourceraw docstring

outdated?clj

(outdated? result check)
(outdated? result check relative-to)

Returns true if the result of the check is outdated, false otherwise.

For a realtime check, a result is always considered outdated.

For a background check, a result is considered outdated if the time to re-evaluation of the check has passed, i.e., if its evaluation date time is before the current date time minus the check's time to re-evaluation.

If relative-to is provided, the calculation is performed relative to that date time rather than to the current date time.

Returns `true` if the result of the check is outdated, `false`
otherwise.

For a realtime check, a result is always considered outdated.

For a background check, a result is considered outdated if the
time to re-evaluation of the check has passed, i.e., if its evaluation date
time is before the current date time minus the check's time to re-evaluation.

If `relative-to` is provided, the calculation is performed relative to that
date time rather than to the current date time.
sourceraw docstring

prependclj

(prepend result extra-data)

Adds each entry from the provided map of extra data to the result if no entry already exists in the result for the key.

Adds each entry from the provided map of extra data to the result if no entry
already exists in the result for the key.
sourceraw docstring

resultclj

(result status)
(result
  status
  {:keys [salutem/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 :salutem/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 `:salutem/evaluated-at` field is
added to the result, set to the current date time in the system default time
zone.
sourceraw docstring

statusclj

(status result)

Returns the status of the provided result.

Returns the status of the provided result.
sourceraw docstring

unhealthyclj

(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 :salutem/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 `:salutem/evaluated-at` field is
added to the result, set to the current date time in the system default time
zone.
sourceraw docstring

unhealthy?clj

(unhealthy? result)

Returns true if the result has an :unhealthy status, false otherwise.

Returns `true` if the result has an `:unhealthy` status, `false`
otherwise.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close