local

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultInstanceLocalValue

type DefaultInstanceLocalValue struct {
	// contains filtered or unexported fields
}

DefaultInstanceLocalValue 用于存储实例的本地信息

func (*DefaultInstanceLocalValue) GetActiveDetectStatus

func (lv *DefaultInstanceLocalValue) GetActiveDetectStatus() model.ActiveDetectStatus

GetActiveDetectStatus 返回健康检测信息

func (*DefaultInstanceLocalValue) GetCircuitBreakerStatus

func (lv *DefaultInstanceLocalValue) GetCircuitBreakerStatus() model.CircuitBreakerStatus

GetCircuitBreakerStatus 返回熔断信息

func (*DefaultInstanceLocalValue) GetExtendedData

func (lv *DefaultInstanceLocalValue) GetExtendedData(pluginIndex int32) interface{}

GetExtendedData 获取插件数据

func (*DefaultInstanceLocalValue) GetSliceWindows

func (lv *DefaultInstanceLocalValue) GetSliceWindows(pluginIndex int32) []*metric.SliceWindow

GetSliceWindows 获取滑窗

func (*DefaultInstanceLocalValue) SetActiveDetectStatus

func (lv *DefaultInstanceLocalValue) SetActiveDetectStatus(st model.ActiveDetectStatus)

SetActiveDetectStatus 设置健康检测信息

func (*DefaultInstanceLocalValue) SetCircuitBreakerStatus

func (lv *DefaultInstanceLocalValue) SetCircuitBreakerStatus(st model.CircuitBreakerStatus)

SetCircuitBreakerStatus 设置熔断信息

func (*DefaultInstanceLocalValue) SetExtendedData

func (lv *DefaultInstanceLocalValue) SetExtendedData(pluginIndex int32, data interface{})

SetExtendedData 设置插件数据

func (*DefaultInstanceLocalValue) SetSliceWindows

func (lv *DefaultInstanceLocalValue) SetSliceWindows(pluginIndex int32, windows []*metric.SliceWindow)

SetSliceWindows 设置滑窗

type DefaultServiceLocalValue

type DefaultServiceLocalValue struct {
	// contains filtered or unexported fields
}

DefaultServiceLocalValue 服务localvalue实现

func NewServiceLocalValue

func NewServiceLocalValue() *DefaultServiceLocalValue

NewServiceLocalValue 创建服务localvalue

func (*DefaultServiceLocalValue) GetServiceDataByPluginId

func (sv *DefaultServiceLocalValue) GetServiceDataByPluginId(pluginIdx int32) interface{}

GetServiceDataByPluginId 获取服务localvalue数据

func (*DefaultServiceLocalValue) GetServiceDataByPluginType

func (sv *DefaultServiceLocalValue) GetServiceDataByPluginType(pluginType common.Type) interface{}

GetServiceDataByPluginType 获取服务localvalue数据

func (*DefaultServiceLocalValue) SetServiceDataByPluginId

func (sv *DefaultServiceLocalValue) SetServiceDataByPluginId(pluginIdx int32, data interface{})

SetServiceDataByPluginId 设置服务localvalue数据

func (*DefaultServiceLocalValue) SetServiceDataByPluginType

func (sv *DefaultServiceLocalValue) SetServiceDataByPluginType(pluginType common.Type, data interface{})

SetServiceDataByPluginType 设置服务localvalue数据

type InstanceLocalValue

type InstanceLocalValue interface {
	// GetSliceWindows 获取统计滑窗
	GetSliceWindows(int32) []*metric.SliceWindow
	// GetCircuitBreakerStatus 实例的熔断状态
	GetCircuitBreakerStatus() model.CircuitBreakerStatus
	// GetActiveDetectStatus 实例的健康检查状态
	GetActiveDetectStatus() model.ActiveDetectStatus
	GetExtendedData(pluginIndex int32) interface{}
	SetExtendedData(pluginIndex int32, data interface{})
}

InstanceLocalValue 本地实例数据,包括熔断,动态权重等信息

func NewInstanceLocalValue

func NewInstanceLocalValue() InstanceLocalValue

NewInstanceLocalValue 创建默认的实例本地信息

type ServiceLocalValue

type ServiceLocalValue interface {
	// 通过插件ID获取服务级缓存数据
	GetServiceDataByPluginId(pluginIdx int32) interface{}
	// 设置通过插件ID索引的服务级缓存数据
	SetServiceDataByPluginId(pluginIdx int32, data interface{})
	// 通过插件类型来获取服务级缓存数据
	GetServiceDataByPluginType(pluginType common.Type) interface{}
	// 设置通过插件类型来索引的服务级缓存数据
	SetServiceDataByPluginType(pluginType common.Type, data interface{})
}

ServiceLocalValue 服务localvalue接口

Jump to

Keyboard shortcuts

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