plugin

package
v1.4.4-alpha.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPluginAPIName

func GetPluginAPIName(p PluginAPI) string

GetPluginAPIName 获取插件api的名字

func PoolPutPluginMethodGauge

func PoolPutPluginMethodGauge(g *PluginMethodGauge)

PoolPutPluginMethodGauge 将PluginMethodGauge放回pluginStatPool中

Types

type PluginAPI

type PluginAPI int

PluginAPI is the interface for plugin

const (
	MethodReportAlarm PluginAPI = iota
	MethodStat
	MethodCircuitBreak
	MethodChooseInstance
	MethodGetServices
	MethodGetInstances
	MethodLoadInstances
	MethodUpdateInstances
	MethodPersistMessage
	MethodLoadPersistedMessage
	MethodGetServiceRouteRule
	MethodLoadServiceRouteRule
	MethodGetServiceRateLimitRule
	MethodLoadServiceRateLimitRule
	MethodDetectInstance
	MethodInitQuota
	MethodRegisterServiceHandler
	MethodDeRegisterServiceHandler
	MethodRegisterInstance
	MethodDeregisterInstance
	MethodHeartbeat
	MethodReportClient
	MethodUpdateServers
	MethodGetRateLimitConnector
	MethodEnable
	MethodGetFilteredInstances
	MethodReportStat
	MethodRealTimeAdjustDynamicWeight
	MethodTimingAdjustDynamicWeight
	MethodWatchService
)

type PluginAPIDelayRange

type PluginAPIDelayRange int

PluginAPIDelayRange 定义插件api的延迟范围

const (
	// PluginApiDelayBelow10 用于插件api延迟小于10ms
	PluginApiDelayBelow10 PluginAPIDelayRange = iota
	// PluginApiDelayBelow20 用于插件api延迟小于20ms
	PluginApiDelayBelow20
	// PluginApiDelayBelow30 用于插件api延迟小于30ms
	PluginApiDelayBelow30
	// PluginApiDelayBelow40 用于插件api延迟小于40ms
	PluginApiDelayBelow40
	// PluginApiDelayBelow50 用于插件api延迟小于50ms
	PluginApiDelayBelow50
	// PluginApiDelayOver50 用于插件api延迟大于50ms
	PluginApiDelayOver50
	// PluginApiDelayMax 最大值
	PluginApiDelayMax
)

API延时范围常量

func GetPluginAPIDelayRange

func GetPluginAPIDelayRange(delay time.Duration) PluginAPIDelayRange

GetPluginAPIDelayRange 将插件接口调用延时转化为PluginAPIDelayRange

func (PluginAPIDelayRange) String

func (d PluginAPIDelayRange) String() string

String 将api的延时范围转化为string

type PluginMethodGauge

type PluginMethodGauge struct {
	model.EmptyInstanceGauge
	PluginType   common.Type
	PluginId     int32
	PluginMethod PluginAPI
	RetCode      model.ErrCode
	Success      bool
	DelayRange   PluginAPIDelayRange
}

PluginMethodGauge 插件接口统计数据

Jump to

Keyboard shortcuts

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