filteronly

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFilteredInstances

func GetFilteredInstances(ctx model.ValueContext, routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters,
	percentOfMinInstances float64, withinCluster *model.Cluster, recoverAll bool) (*servicerouter.RouteResult, error)

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

Types

type InstancesFilter

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

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

func (*InstancesFilter) Destroy

func (g *InstancesFilter) Destroy() error

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

func (*InstancesFilter) Enable

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

Enable 是否需要启动规则路由

func (*InstancesFilter) GetFilteredInstances

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

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

func (*InstancesFilter) Init

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

Init 初始化插件

func (*InstancesFilter) Name

func (g *InstancesFilter) Name() string

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

func (*InstancesFilter) Type

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

Type 插件类型

Jump to

Keyboard shortcuts

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