Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // The threshold over sliding window that would trip the circuit breaker Threshold float64 `json:"threshold,omitempty"` // Possible values: latency, error_ratio, and status_ratio. It // defaults to latency. Factor string `json:"factor,omitempty"` // How long to wait after the circuit is tripped before allowing operations to resume. // The default is 5s. TripDuration caddy.Duration `json:"trip_duration,omitempty"` }
Config represents the configuration of a circuit breaker.
type Simple ¶
type Simple struct { Config // contains filtered or unexported fields }
Simple implements circuit breaking functionality for requests within this process over a sliding time window.
func (Simple) CaddyModule ¶
func (Simple) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
Click to show internal directories.
Click to hide internal directories.