(failure error)
(failure base-response error)
Indicates a service is down. If only an error
is given, then
you will get just a map that looks like {:up? false :error error}
.
Otherwise, the given base-response
will be merged into the above map
Indicates a service is down. If only an `error` is given, then you will get just a map that looks like `{:up? false :error error}`. Otherwise, the given `base-response` will be merged into the above map
(health-check m)
(health-check af m)
Checks various services and aggregates their statuses up into a single overall status with descriptive data
m -- map of service name and function/value
which represent the status of those
services
af -- an aggregation function which takes all the sub-statuses
of a structure and converts them into a single boolean value
defaults to `every?`
If it is a function it should return the result of a call to either failure
,
success
or response
. Alternatively, the function could return any value
which will be passed straight through without contributing to the overall
status.
For example:
(health-check
{:version "1.2.3"
:up? (fn []
(try (success (hit-db))
(catch Exception e
(failure "db down")))})
Checks various services and aggregates their statuses up into a single overall status with descriptive data m -- map of service name and function/value which represent the status of those services af -- an aggregation function which takes all the sub-statuses of a structure and converts them into a single boolean value defaults to `every?` If it is a function it should return the result of a call to either `failure`, `success` or `response`. Alternatively, the function could return any value which will be passed straight through without contributing to the overall status. For example: (health-check {:version "1.2.3" :up? (fn [] (try (success (hit-db)) (catch Exception e (failure "db down")))})
(jvm-settings)
Produces the arguments that were sent to the currently running process.
Produces the arguments that were sent to the currently running process.
(memory-info)
Produce a map that contains memory usage information.
Produce a map that contains memory usage information.
(network-test test-url error-fn & {:as override-options})
A generic network test function using clj-http. Give it a URL to hit and a function to invoke if an exception occurs. The function will receive the exception as its first parameter.
A generic network test function using clj-http. Give it a URL to hit and a function to invoke if an exception occurs. The function will receive the exception as its first parameter.
(response base-response error & [status])
Indicates a service is either up or down. If an error
is not nil
, then
you will get a map that looks like {:up? false :error error}
. Otherwise,
the map will look like {:up? true :status status}
. It will then
be merged into the base-response
.
Indicates a service is either up or down. If an `error` is not `nil`, then you will get a map that looks like `{:up? false :error error}`. Otherwise, the map will look like `{:up? true :status status}`. It will then be merged into the `base-response`.
(success status)
(success base-response status)
Indicates a service is up. If only a status
is given, then
you will get just a map that looks like {:up? true :status status}
.
Otherwise, the given base-response
will be merged into the above map
Indicates a service is up. If only a `status` is given, then you will get just a map that looks like `{:up? true :status status}`. Otherwise, the given `base-response` will be merged into the above map
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close