Linting middlewares package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
parent
7766d0ddaa
commit
9387235a04
4 changed files with 11 additions and 15 deletions
|
@ -1,6 +1,3 @@
|
|||
/*
|
||||
Copyright
|
||||
*/
|
||||
package middlewares
|
||||
|
||||
import (
|
||||
|
@ -9,10 +6,12 @@ import (
|
|||
"github.com/mailgun/oxy/cbreaker"
|
||||
)
|
||||
|
||||
// CircuitBreaker holds the oxy circuit breaker.
|
||||
type CircuitBreaker struct {
|
||||
circuitBreaker *cbreaker.CircuitBreaker
|
||||
}
|
||||
|
||||
// NewCircuitBreaker returns a new CircuitBreaker.
|
||||
func NewCircuitBreaker(next http.Handler, expression string, options ...cbreaker.CircuitBreakerOption) *CircuitBreaker {
|
||||
circuitBreaker, _ := cbreaker.New(next, expression, options...)
|
||||
return &CircuitBreaker{circuitBreaker}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue