mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
A circuit breaker sits under the retry layer of both Docker clients and counts consecutive transport failures: an I/O error or an unusable socket, never an HTTP response or a wait for a pooled connection. After floci.docker.breaker-failure-threshold (3) of them it pings the daemon off the caller's thread, over a one-connection transport of its own; only when that ping fails too does every Docker call fail at once with DockerUnavailableException, which the retry layer never replays. While open it pings every floci.docker.breaker-probe-interval-seconds (5), and the first answer closes it. Any HTTP status to the ping is an answer, and a ping that never reaches the daemon neither opens nor closes the breaker. A threshold of 0 turns it off.