Provides constructors, query functions and resolution functions for registries.
Provides constructors, query functions and resolution functions for registries.
(all-checks registry)
Returns the set of checks present in the registry.
Returns the set of checks present in the registry.
(check-names registry)
Returns the set of check names present in the registry.
Returns the set of check names present in the registry.
(empty-registry)
Constructs an empty registry which can be populated using with-check
and
with-cached-result
.
Constructs an empty registry which can be populated using [[with-check]] and [[with-cached-result]].
(find-cached-result registry check-name)
Finds the cached result for the check with the given name in the registry.
Returns nil
if no result can be found or if the check does not exist.
Finds the cached result for the check with the given name in the registry. Returns `nil` if no result can be found or if the check does not exist.
(find-check registry check-name)
Finds the check with the given name in the registry. Returns nil
if no
check can be found.
Finds the check with the given name in the registry. Returns `nil` if no check can be found.
(outdated-checks registry)
Returns the set of checks that are currently outdated in the registry based on the type of the check and the cached results available.
See [[salutem.results/outdated?]] for details on which it means for a check to be outdated.
Returns the set of checks that are currently outdated in the registry based on the type of the check and the cached results available. See [[salutem.results/outdated?]] for details on which it means for a check to be outdated.
(resolve-check registry check-name)
(resolve-check registry check-name context)
Resolves a result for the check of the given name in the registry.
If the check is a background check and there is a cached result available, it is returned. If no cached result is available, the check is evaluated in order to obtain a result to return.
If the check is a realtime check, it is always evaluated in order to obtain a result to return and caching is not used.
Optionally takes a context map containing arbitrary context required by the check in order to run and passed to the check function as the first argument.
Resolves a result for the check of the given name in the registry. If the check is a background check and there is a cached result available, it is returned. If no cached result is available, the check is evaluated in order to obtain a result to return. If the check is a realtime check, it is always evaluated in order to obtain a result to return and caching is not used. Optionally takes a context map containing arbitrary context required by the check in order to run and passed to the check function as the first argument.
(resolve-checks registry)
(resolve-checks registry context)
Resolves all checks in the registry, returning a map of check names to results.
Optionally takes a context map containing arbitrary context required by checks in order to run and passed to the check functions as the first argument.
See resolve-check
for details on how each check is resolved.
Resolves all checks in the registry, returning a map of check names to results. Optionally takes a context map containing arbitrary context required by checks in order to run and passed to the check functions as the first argument. See [[resolve-check]] for details on how each check is resolved.
(with-cached-result registry check-name result)
Adds the result for the check with the given name to the registry, returning a new registry.
Adds the result for the check with the given name to the registry, returning a new registry.
(with-check registry check)
Adds the check to the registry, returning a new registry.
Adds the check to the registry, returning a new registry.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close