Liking cljdoc? Tell your friends :D

resilience.bulkhead


*bulkhead-name*clj

Contextual value represents bulkhead name

Contextual value represents bulkhead name
sourceraw docstring

*creation-time*clj

Contextual value represents event create time

Contextual value represents event create time
sourceraw docstring

bulkheadclj

(bulkhead name)
(bulkhead name config)

Create a bulkhead with a name and a default or custom bulkhead configuration.

The name argument is only used to register this newly created bulkhead to a BulkheadRegistry. If you don't want to bind this bulkhead with a BulkheadRegistry, the name argument is ignored.

Please refer to bulkhead-config for allowed key value pairs within the bulkhead configurations map.

If you want to register this bulkhead to a BulkheadRegistry, you need to put :registry key with a BulkheadRegistry in the config argument. If you do not provide any other configurations, the newly created bulkhead will inherit bulkhead configurations from this provided BulkheadRegistry Example: (bulkhead my-bulkhead {:registry my-registry})

If you want to register this bulkhead to a BulkheadRegistry and you want to use new bulkhead configurations to overwrite the configurations inherited from the registered BulkheadRegistry, you need not only provide the :registry key with the BulkheadRegistry in config argument but also provide other bulkhead configurations you'd like to overwrite. Example: (bulkhead my-bulkhead {:registry my-registry :max-wait-millis 50})

If you only want to create a bulkhead and not register it to any BulkheadRegistry, you just need to provide bulkhead configurations in config argument. The name argument is ignored.

Create a bulkhead with a `name` and a default or custom bulkhead configuration.

The `name` argument is only used to register this newly created bulkhead
to a BulkheadRegistry. If you don't want to bind this bulkhead with
a BulkheadRegistry, the `name` argument is ignored.

Please refer to `bulkhead-config` for allowed key value pairs
within the bulkhead configurations map.

If you want to register this bulkhead to a BulkheadRegistry,
you need to put :registry key with a BulkheadRegistry in the `config`
argument. If you do not provide any other configurations, the newly created
bulkhead will inherit bulkhead configurations from this
provided BulkheadRegistry
Example:
(bulkhead my-bulkhead {:registry my-registry})

If you want to register this bulkhead to a BulkheadRegistry
and you want to use new bulkhead configurations to overwrite the configurations
inherited from the registered BulkheadRegistry,
you need not only provide the :registry key with the BulkheadRegistry in `config`
argument but also provide other bulkhead configurations you'd like to overwrite.
Example:
(bulkhead my-bulkhead {:registry my-registry
                       :max-wait-millis 50})

If you only want to create a bulkhead and not register it to any
BulkheadRegistry, you just need to provide bulkhead configurations in `config`
argument. The `name` argument is ignored.
sourceraw docstring

bulkhead-configclj

(bulkhead-config opts)

Create a BulkheadConfig.

Allowed options are:

  • :max-concurrent-calls Configures the max amount of concurrent calls the bulkhead will support.

  • :max-wait-millis Configures a maximum amount of time in ms the calling thread will wait to enter the bulkhead. If bulkhead has space available, entry is guaranteed and immediate. If bulkhead is full, calling threads will contest for space, if it becomes available. :max-wait-millis can be set to 0.

    Note: for threads running on an event-loop or equivalent (rx computation pool, etc), setting :max-wait-time to 0 is highly recommended. Blocking an event-loop thread will most likely have a negative effect on application throughput.

Create a BulkheadConfig.

Allowed options are:
* :max-concurrent-calls
  Configures the max amount of concurrent calls the bulkhead will support.

* :max-wait-millis
  Configures a maximum amount of time in ms the calling thread will wait
  to enter the bulkhead. If bulkhead has space available, entry is
  guaranteed and immediate. If bulkhead is full, calling threads will
  contest for space, if it becomes available. :max-wait-millis can be set to 0.

  Note: for threads running on an event-loop or equivalent (rx computation
  pool, etc), setting :max-wait-time to 0 is highly recommended. Blocking an
  event-loop thread will most likely have a negative effect on application
  throughput.
 
sourceraw docstring

configclj

(config bulkhead)

Get the Metrics of this Bulkhead

Get the Metrics of this Bulkhead
sourceraw docstring

defbulkheadcljmacro

(defbulkhead name)
(defbulkhead name config)

Define a bulkhead under name with a default or custom configuration.

Please refer to bulkhead-config for allowed key value pairs within the bulkhead configuration.

If you want to register this bulkhead to a BulkheadRegistry, you need to put :registry key with a BulkheadRegistry in the config argument. If you do not provide any other configurations, the newly created bulkhead will inherit bulkhead configurations from this provided BulkheadRegistry Example: (defbulkhead my-bulkhead {:registry my-registry})

If you want to register this bulkhead to a BulkheadRegistry and you want to use new bulkhead configurations to overwrite the configurations inherited from the registered BulkheadRegistry, you need not only provide the :registry key with the BulkheadRegistry in config argument but also provide other bulkhead configurations you'd like to overwrite. Example: (defbulkhead my-bulkhead {:registry my-registry :max-wait-millis 50})

If you only want to create a bulkhead and not register it to any BulkheadRegistry, you just need to provide bulkhead configuration in config argument without :registry keyword.

Define a bulkhead under `name` with a default or custom configuration.

Please refer to `bulkhead-config` for allowed key value pairs
within the bulkhead configuration.

If you want to register this bulkhead to a BulkheadRegistry,
you need to put :registry key with a BulkheadRegistry in the `config`
argument. If you do not provide any other configurations, the newly created
bulkhead will inherit bulkhead configurations from this
provided BulkheadRegistry
Example:
(defbulkhead my-bulkhead {:registry my-registry})

If you want to register this bulkhead to a BulkheadRegistry
and you want to use new bulkhead configurations to overwrite the configurations
inherited from the registered BulkheadRegistry,
you need not only provide the :registry key with the BulkheadRegistry in `config`
argument but also provide other bulkhead configurations you'd like to overwrite.
Example:
(defbulkhead my-bulkhead {:registry my-registry
                          :max-wait-millis 50})

If you only want to create a bulkhead and not register it to any
BulkheadRegistry, you just need to provide bulkhead configuration in `config`
argument without :registry keyword.
sourceraw docstring

defregistrycljmacro

(defregistry name)
(defregistry name config)

Define a BulkheadRegistry under name with a defual or custom bulkhead configuration.

Please refer to bulkhead-config for allowed key value pairs within the bulkhead configuration map.

Define a BulkheadRegistry under `name` with a defual or custom
bulkhead configuration.

Please refer to `bulkhead-config` for allowed key value pairs
within the bulkhead configuration map.
sourceraw docstring

get-all-bulkheadsclj

(get-all-bulkheads registry)

Get all bulkhead registered to this bulkhead registry instance

Get all bulkhead registered to this bulkhead registry instance
sourceraw docstring

metricsclj

(metrics bulkhead)

Get the BulkheadConfig of this Bulkhead

Get the BulkheadConfig of this Bulkhead
sourceraw docstring

nameclj

(name bulkhead)

Get the name of this Bulkhead

Get the name of this Bulkhead
sourceraw docstring

on-completeclj

(on-complete bulkhead)

Records a completed call.

Records a completed call.
sourceraw docstring

registry-with-configclj

(registry-with-config config)

Create a BulkheadRegistry with a bulkhead configurations map.

Please refer to bulkhead-config for allowed key value pairs within the bulkhead configuration map.

Create a BulkheadRegistry with a bulkhead configurations map.

Please refer to `bulkhead-config` for allowed key value pairs
within the bulkhead configuration map.
sourceraw docstring

set-on-all-event-consumer!clj

(set-on-all-event-consumer! bulkhead consumer-fn-map)
source

set-on-call-finished-event-consumer!clj

(set-on-call-finished-event-consumer! bulkhead consumer-fn)
source

set-on-call-permitted-event-consumer!clj

(set-on-call-permitted-event-consumer! bulkhead consumer-fn)

set a consumer to consume on-call-permitted event which emitted when request permitted by bulkhead. consumer-fn accepts a function which takes no arguments.

Please note that in consumer-fn you can get the bulkhead name and the creation time of the consumed event by accessing *bulkhead-name* and *creation-time* under this namespace.

set a consumer to consume `on-call-permitted` event which emitted when request permitted by bulkhead.
`consumer-fn` accepts a function which takes no arguments.

Please note that in `consumer-fn` you can get the bulkhead name and the creation time of the
consumed event by accessing `*bulkhead-name*` and `*creation-time*` under this namespace.
sourceraw docstring

set-on-call-rejected-event-consumer!clj

(set-on-call-rejected-event-consumer! bulkhead consumer-fn)
source

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

× close