Liking cljdoc? Tell your friends :D

net.modulolotus.truegrit.bulkhead

Implements semaphore-based bulkheads.

See https://resilience4j.readme.io/docs/bulkhead

Implements semaphore-based bulkheads.

See https://resilience4j.readme.io/docs/bulkhead
raw docstring

*default-config*clj

Set this to override the R4j defaults with your own

Set this to override the R4j defaults with your own
sourceraw docstring

add-listenersclj

(add-listeners bh
               {:keys [on-event on-call-rejected on-call-permitted
                       on-call-finished]})

Add event handlers for Bulkhead lifecycle events.

Config map options

  • :on-event - a handler that runs for all events
  • :on-call-rejected - a handler that runs when a call was rejected - receives a BulkheadOnCallRejectedEvent
  • :on-call-permitted - a handler that runs when a call was permitted - receives a BulkheadOnCallPermittedEvent
  • :on-call-finished - a handler that runs when a call finishes - receives a BulkheadOnCallFinishedEvent
Add event handlers for Bulkhead lifecycle events.

Config map options
 - `:on-event` - a handler that runs for all events
 - `:on-call-rejected` - a handler that runs when a call was rejected - receives a BulkheadOnCallRejectedEvent
 - `:on-call-permitted` - a handler that runs when a call was permitted - receives a BulkheadOnCallPermittedEvent
 - `:on-call-finished` - a handler that runs when a call finishes - receives a BulkheadOnCallFinishedEvent
sourceraw docstring

bulkheadclj

(bulkhead bulkhead-name config)

Creates a Bulkhead with the given name and config.

Creates a Bulkhead with the given name and config.
sourceraw docstring

bulkhead-configclj

(bulkhead-config config)

Creates a Resilience4j BulkheadConfig.

Config map options:

  • :max-concurrent-calls - max allowed number of simultaneous calls - defaults to 25
  • :max-wait-duration - maximum amount of time to block waiting to execute - defaults to 0 ms - accepts number of ms or java.time.Duration
Creates a Resilience4j BulkheadConfig.

Config map options:
 - `:max-concurrent-calls` - max allowed number of simultaneous calls - defaults to 25
 - `:max-wait-duration` - maximum amount of time to block waiting to execute - defaults to 0 ms - accepts number of ms or java.time.Duration
sourceraw docstring

metricsclj

(metrics bh)

Returns metrics for the given bulkhead.

Returns metrics for the given bulkhead.
sourceraw docstring

retrieveclj

(retrieve f)

Retrieves a bulkhead from a wrapped fn

Retrieves a bulkhead from a wrapped fn
sourceraw docstring

wrapclj

(wrap f bh)

Wraps a function in a Bulkhead. Throws BulkheadFullException if full and times out.

Attaches the bulkhead as metadata on the wrapped fn at :truegrit/bulkhead

Wraps a function in a Bulkhead. Throws BulkheadFullException if full and times out.

Attaches the bulkhead as metadata on the wrapped fn at :truegrit/bulkhead
sourceraw docstring

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

× close