plugin

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 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
const (
	MethodReportAlarm PluginAPI = iota
	MethodStat
	MethodCircuitBreak
	MethodChooseInstance
	MethodGetServices
	MethodGetInstances
	MethodLoadInstances
	MethodUpdateInstances
	MethodPersistMessage
	MethodLoadPersistedMessage
	MethodGetServiceRouteRule
	MethodLoadServiceRouteRule
	MethodLoadMeshConfig
	MethodGetServiceRateLimitRule
	MethodLoadServiceRateLimitRule
	MethodDetectInstance
	MethodInitQuota
	MethodRegisterServiceHandler
	MethodDeRegisterServiceHandler
	MethodRegisterInstance
	MethodDeregisterInstance
	MethodHeartbeat
	MethodReportClient
	MethodUpdateServers
	MethodGetRateLimitConnector
	MethodEnable
	MethodGetFilteredInstances
	MethodReportStat
	MethodRealTimeAdjustDynamicWeight
	MethodTimingAdjustDynamicWeight
	MethodWatchService
)

type PluginAPIDelayRange

type PluginAPIDelayRange int
const (
	PluginApiDelayBelow10 PluginAPIDelayRange = iota
	PluginApiDelayBelow20
	PluginApiDelayBelow30
	PluginApiDelayBelow40
	PluginApiDelayBelow50
	PluginApiDelayOver50
	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