circuitbreaker

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MaxNumOfFailingRequests ...
	MaxNumOfFailingRequests = 10
	// FailingRatio ...
	FailingRatio = 0.6
)

Functions

func NewCircuitBreaker

func NewCircuitBreaker() *gobreaker.CircuitBreaker

NewCircuitBreaker is a factory function returning a *gobreaker.CircuitBreaker with a default state-changing function that activates if the overall number of failing requests have reached a tweakable MaxNumOfFailingRequests cap and the failing ratio has met the FailingRatio.

Types

This section is empty.

Jump to

Keyboard shortcuts

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