zeroprotect

package
v1.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetadataInstanceLastHeartbeatTime = "internal-lastheartbeat"
)

Variables

This section is empty.

Functions

func NeedZeroProtect

func NeedZeroProtect(lastBeat, beatTime, ttl int64) bool

NeedZeroProtect .

Types

type ZeroProtectFilter

type ZeroProtectFilter struct {
	*plugin.PluginBase
	// contains filtered or unexported fields
}

ZeroProtectFilter 基于路由规则的服务实例过滤器

func (*ZeroProtectFilter) Destroy

func (g *ZeroProtectFilter) Destroy() error

Destroy 销毁插件,可用于释放资源

func (*ZeroProtectFilter) Enable

func (g *ZeroProtectFilter) Enable(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters) bool

Enable 是否需要启动规则路由

func (*ZeroProtectFilter) GetFilteredInstances

func (g *ZeroProtectFilter) GetFilteredInstances(routeInfo *servicerouter.RouteInfo,
	clusters model.ServiceClusters, withinCluster *model.Cluster) (*servicerouter.RouteResult, error)

GetFilteredInstances 插件模式进行服务实例过滤,并返回过滤后的实例列表

func (*ZeroProtectFilter) Init

func (g *ZeroProtectFilter) Init(ctx *plugin.InitContext) error

Init 初始化插件

func (*ZeroProtectFilter) Name

func (g *ZeroProtectFilter) Name() string

Name 插件名,一个类型下插件名唯一

func (*ZeroProtectFilter) Type

func (g *ZeroProtectFilter) Type() common.Type

Type 插件类型

Jump to

Keyboard shortcuts

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