setdivision

package
v1.4.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SetEnableFilter

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

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

func (*SetEnableFilter) Destroy

func (g *SetEnableFilter) Destroy() error

Destroy 销毁插件,可用于释放资源,暂时不需要

func (*SetEnableFilter) Enable

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

Enable 是否需要启动该服务插件

func (*SetEnableFilter) GetFilteredInstances

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

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

func (*SetEnableFilter) Init

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

Init 初始化插件

func (*SetEnableFilter) Name

func (g *SetEnableFilter) Name() string

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

func (*SetEnableFilter) Type

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

Type 插件类型,接口实现必须

Jump to

Keyboard shortcuts

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