Documentation
¶
Index ¶
Constants ¶
View Source
const ( // StateClosed when circuit breaker closed, request allowed, the breaker // calc the succeed ratio, if request num greater request setting and // ratio lower than the setting ratio, then reset state to open. StateClosed int32 = iota // StateOpen when circuit breaker open, request not allowed, after sleep // some duration, allow one single request for testing the health, if ok // then state reset to closed, if not continue the step. StateOpen )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BreakerGroup ¶
type BreakerGroup struct {
// contains filtered or unexported fields
}
BreakerGroup brks
func NewBreakerGroup ¶
func NewBreakerGroup() *BreakerGroup
NewBreakerGroup returns global breaker group instance brks
func (*BreakerGroup) Get ¶
func (bg *BreakerGroup) Get(name string) Breaker
Get return a break associate with the name
type GoogleSreBreakerConfig ¶
Click to show internal directories.
Click to hide internal directories.