Discover Packages
github.com/xwc1125/xwc1125-pkg
middleware
circuitbreaker
zerobreaker
package
Version:
v0.1.3
Opens a new window with list of versions in this module.
Published: May 10, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package zerobreaker
Package zerobreaker
ErrServiceUnavailable is returned when the Breaker state is open.
NewBreaker returns a Breaker object.
opts can be used to customize the Breaker.
type Option func(breaker *circuitBreaker)
Option defines the method to customize a Breaker.
WithName returns a function to set the name of a Breaker.
type Promise interface {
Accept()
Reject(reason string )
}
Promise interface defines the callbacks that returned by Breaker.Allow.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.