nearbybase

package
v1.2.0-beta.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NearbyBasedInstancesFilter

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

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

func (*NearbyBasedInstancesFilter) Destroy

func (g *NearbyBasedInstancesFilter) Destroy() error

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

func (*NearbyBasedInstancesFilter) Enable

当前是否需要启动该服务路由插件

func (*NearbyBasedInstancesFilter) GetFilteredInstances

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

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

func (*NearbyBasedInstancesFilter) GetLevel

func (g *NearbyBasedInstancesFilter) GetLevel(clusters model.ServiceClusters) (int, int)

func (*NearbyBasedInstancesFilter) Init

Init 初始化插件

func (*NearbyBasedInstancesFilter) Name

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

func (*NearbyBasedInstancesFilter) Type

Type 插件类型

Jump to

Keyboard shortcuts

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