circuitbreaker

package
v1.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAllowed = errors.New(503, "CIRCUITBREAKER", "request failed due to circuit breaker triggered")

ErrNotAllowed is request failed due to circuit breaker triggered.

Functions

func Client

func Client(opts ...Option) middleware.Middleware

Client circuitbreaker middleware will return errBreakerTriggered when the circuit breaker is triggered and the request is rejected directly.

Types

type Option added in v1.0.14

type Option func(*Options)

Option represents options update func

func WithCircuitBreaker added in v1.0.14

func WithCircuitBreaker(c circuitbreaker.CircuitBreaker) Option

type Options added in v1.0.14

type Options struct {
	// contains filtered or unexported fields
}

Options represents hystrix client wrapper options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL