Documentation ¶
Index ¶
- type NearbyBasedInstancesFilter
- func (g *NearbyBasedInstancesFilter) Destroy() error
- func (g *NearbyBasedInstancesFilter) Enable(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters) bool
- func (g *NearbyBasedInstancesFilter) GetFilteredInstances(rInfo *servicerouter.RouteInfo, clusters model.ServiceClusters, ...) (*servicerouter.RouteResult, error)
- func (g *NearbyBasedInstancesFilter) GetLevel(clusters model.ServiceClusters) (int, int)
- func (g *NearbyBasedInstancesFilter) Init(ctx *plugin.InitContext) error
- func (g *NearbyBasedInstancesFilter) Name() string
- func (g *NearbyBasedInstancesFilter) Type() common.Type
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 (g *NearbyBasedInstancesFilter) Enable(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters) bool
当前是否需要启动该服务路由插件
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 ¶
func (g *NearbyBasedInstancesFilter) Init(ctx *plugin.InitContext) error
Init 初始化插件
func (*NearbyBasedInstancesFilter) Name ¶
func (g *NearbyBasedInstancesFilter) Name() string
Name 插件名,一个类型下插件名唯一
func (*NearbyBasedInstancesFilter) Type ¶
func (g *NearbyBasedInstancesFilter) Type() common.Type
Type 插件类型
Click to show internal directories.
Click to hide internal directories.