Liking cljdoc? Tell your friends :D

railway-clj.circuit-breaker


create-circuit-breakerclj

(create-circuit-breaker &
                        [{:keys [failure-threshold reset-timeout-ms
                                 half-open-calls failure-predicate]
                          :or {failure-threshold 5
                               reset-timeout-ms 10000
                               half-open-calls 1
                               failure-predicate failure?}}])

サーキットブレーカーを作成します。

options:

  • :failure-threshold - 開回路になるための連続失敗回数の閾値(デフォルト: 5)
  • :reset-timeout-ms - 半開回路状態になるまでの時間(ミリ秒)(デフォルト: 10000)
  • :half-open-calls - 半開回路状態で許可する呼び出し回数(デフォルト: 1)
  • :failure-predicate - 失敗とみなす条件を判断する関数(デフォルト: failure?)

返り値は、関数を受け取りサーキットブレーカーを適用した新しい関数を返す高階関数です。

サーキットブレーカーを作成します。

options:
  - :failure-threshold - 開回路になるための連続失敗回数の閾値(デフォルト: 5)
  - :reset-timeout-ms - 半開回路状態になるまでの時間(ミリ秒)(デフォルト: 10000)
  - :half-open-calls - 半開回路状態で許可する呼び出し回数(デフォルト: 1)
  - :failure-predicate - 失敗とみなす条件を判断する関数(デフォルト: failure?)

返り値は、関数を受け取りサーキットブレーカーを適用した新しい関数を返す高階関数です。
sourceraw docstring

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

× close