Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitBreaker ¶
type CircuitBreaker interface { plugin.Plugin // CheckResource get the resource circuitbreaker status CheckResource(model.Resource) model.CircuitBreakerStatus // Report report resource invoke result stat Report(*model.ResourceStat) error }
CircuitBreaker 【扩展点接口】资源熔断(实例熔断、方法熔断、服务熔断)
type Proxy ¶
type Proxy struct { CircuitBreaker // contains filtered or unexported fields }
Proxy .proxy of InstanceCircuitBreaker
func (*Proxy) CheckResource ¶
func (p *Proxy) CheckResource(res model.Resource) model.CircuitBreakerStatus
Stat proxy InstanceCircuitBreaker stat
type Result ¶
type Result struct { Now time.Time // 需要开启熔断器的实例ID InstancesToOpen model.HashSet // 需要转换成半开状态的实例ID InstancesToHalfOpen model.HashSet // 需要关闭熔断器的实例ID InstancesToClose model.HashSet // 该熔断器在实例进入半开状态后最多允许的请求数 RequestCountAfterHalfOpen int }
Result 熔断结算结果
func NewCircuitBreakerResult ¶
NewCircuitBreakerResult 创建熔断结果对象
Click to show internal directories.
Click to hide internal directories.