Documentation ¶
Index ¶
- type CircuitBreaker
- func (g *CircuitBreaker) CircuitBreak(instances []model.Instance) (*circuitbreaker.Result, error)
- func (g *CircuitBreaker) Destroy() error
- func (g *CircuitBreaker) Init(ctx *plugin.InitContext) error
- func (g *CircuitBreaker) IsEnable(cfg config.Configuration) bool
- func (g *CircuitBreaker) Name() string
- func (g *CircuitBreaker) Stat(model.InstanceGauge) (bool, error)
- func (g *CircuitBreaker) Type() common2.Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitBreaker ¶
type CircuitBreaker struct { *plugin.PluginBase // contains filtered or unexported fields }
CircuitBreaker 通过定时探测进行熔断的熔断器
func (*CircuitBreaker) CircuitBreak ¶
func (g *CircuitBreaker) CircuitBreak(instances []model.Instance) (*circuitbreaker.Result, error)
CircuitBreak 进行熔断计算,返回需要进行状态转换的实例ID 入参包括全量服务实例,以及当前周期的健康探测结果
func (*CircuitBreaker) Init ¶
func (g *CircuitBreaker) Init(ctx *plugin.InitContext) error
Init 初始化插件
func (*CircuitBreaker) IsEnable ¶
func (g *CircuitBreaker) IsEnable(cfg config.Configuration) bool
IsEnable 插件是否启用
func (*CircuitBreaker) Stat ¶
func (g *CircuitBreaker) Stat(model.InstanceGauge) (bool, error)
Stat 进行调用统计,返回当前实例是否需要进行立即熔断
Click to show internal directories.
Click to hide internal directories.