circuitbreaker

package
v0.5.24 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotAllowed = errors.New(503, "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

type Option func(*options)

Option is circuit breaker option.

func WithGroup

func WithGroup(g *group.Group) Option

WithGroup with circuit breaker group. NOTE: implements generics circuitbreaker.CircuitBreaker

Jump to

Keyboard shortcuts

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