Implements semaphore-based bulkheads.
Implements semaphore-based bulkheads. See https://resilience4j.readme.io/docs/bulkhead
Set this to override the R4j defaults with your own
Set this to override the R4j defaults with your own
(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 BulkheadOnCallFinishedEventAdd 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
(bulkhead bulkhead-name config)
Creates a Bulkhead with the given name and config.
Creates a Bulkhead with the given name and config.
(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.DurationCreates 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
(metrics bh)
Returns metrics for the given bulkhead.
Returns metrics for the given bulkhead.
(retrieve f)
Retrieves a bulkhead from a wrapped fn
Retrieves a bulkhead from a wrapped fn
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close