cbcheck

package
v1.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 13 Imported by: 0

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 实时熔断任务

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL