Documentation ¶
Overview ¶
Package eapache provides a circuit breaker adapter using the github.com/eapache/go-resiliency/breaker lib.
Sample backend extra config
... "extra_config": { ... "github.com/devopsfaith/krakend-circuitbreaker/eapache": { "success": 60, "timeout": "10s", "error": 5 }, ... }, ...
The eapache package provides an efficient circuit breaker implementation. See https://github.com/eapache/go-resiliency/breaker and https://martinfowler.com/bliki/CircuitBreaker.html for more details.
Index ¶
Constants ¶
View Source
const Namespace = "github.com/devopsfaith/krakend-circuitbreaker/eapache"
Namespace is the key to use to store and access the custom config data
Variables ¶
View Source
var ZeroCfg = Config{}
ZeroCfg is the zero value for the Config struct
Functions ¶
func ConfigGetter ¶
func ConfigGetter(e config.ExtraConfig) interface{}
ConfigGetter implements the config.ConfigGetter interface. It parses the extra config for the eapache adapter and returns a ZeroCfg if something goes wrong.
func NewCircuitBreaker ¶
NewCircuitBreaker builds a eapache circuit breaker with the injected config
Types ¶
Click to show internal directories.
Click to hide internal directories.