Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircuitBreakCallBack ¶
type CircuitBreakCallBack struct {
// contains filtered or unexported fields
}
CircuitBreakCallBack 定时熔断任务回调
func NewCircuitBreakCallBack ¶
func NewCircuitBreakCallBack(cfg config.Configuration, supplier plugin.Supplier) (*CircuitBreakCallBack, error)
NewCircuitBreakCallBack 创建定时熔断任务回调
func (*CircuitBreakCallBack) OnTaskEvent ¶
func (c *CircuitBreakCallBack) OnTaskEvent(event model.TaskEvent)
OnTaskEvent 任务事件回调
func (*CircuitBreakCallBack) Process ¶
func (c *CircuitBreakCallBack) Process( taskKey interface{}, taskValue interface{}, lastProcessTime time.Time) model.TaskResult
Process 执行任务
type CircuitBreakRealTimeCallBack ¶
type CircuitBreakRealTimeCallBack struct {
// contains filtered or unexported fields
}
CircuitBreakRealTimeCallBack 实时熔断任务回调
func NewCircuitBreakRealTimeCallBack ¶
func NewCircuitBreakRealTimeCallBack( callBack *CircuitBreakCallBack, task *RealTimeLimitTask) *CircuitBreakRealTimeCallBack
NewCircuitBreakRealTimeCallBack 创建实时熔断任务
func (*CircuitBreakRealTimeCallBack) Process ¶
func (c *CircuitBreakRealTimeCallBack) Process()
Process 处理实时任务
type RealTimeLimitTask ¶
type RealTimeLimitTask struct { // 服务信息 SvcKey model.ServiceKey // 实例ID InstID string // 机器IP Host string // 端口号 Port int // 熔断器名字 CbName string }
RealTimeLimitTask 实时熔断任务
Click to show internal directories.
Click to hide internal directories.