breaker

package module
v0.0.0-...-f49c6f9 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBreaker = "default"

Variables

View Source
var StdLogger stdLogger

Functions

func GetBreaker

func GetBreaker(breakerName string) *gobreaker.TwoStepCircuitBreaker

func InitBreaker

func InitBreaker(breakerName string, options ...Option) *breaker

Types

type Option

type Option func(*option)

func WithBreakerCount

func WithBreakerCount(breakerCount uint32) Option

func WithHalfOpenCount

func WithHalfOpenCount(halfOpenCount uint32) Option

func WithInterval

func WithInterval(interval time.Duration) Option

func WithOpenStatePeriod

func WithOpenStatePeriod(openStatePeriod time.Duration) Option

Jump to

Keyboard shortcuts

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