Documentation ¶
Index ¶
- func GetFilteredInstances(ctx model.ValueContext, routeInfo *servicerouter.RouteInfo, ...) (*servicerouter.RouteResult, error)
- type InstancesFilter
- func (g *InstancesFilter) Destroy() error
- func (g *InstancesFilter) Enable(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters) bool
- func (g *InstancesFilter) GetFilteredInstances(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters, ...) (*servicerouter.RouteResult, error)
- func (g *InstancesFilter) Init(ctx *plugin.InitContext) error
- func (g *InstancesFilter) Name() string
- func (g *InstancesFilter) Type() common.Type
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) 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 初始化插件
Click to show internal directories.
Click to hide internal directories.