rulebase

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleBasedInstancesFilter

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

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

func (*RuleBasedInstancesFilter) Destroy

func (g *RuleBasedInstancesFilter) Destroy() error

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

func (*RuleBasedInstancesFilter) Enable

Enable 是否需要启动规则路由

func (*RuleBasedInstancesFilter) GetFilteredInstances

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

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

func (*RuleBasedInstancesFilter) Init

Init 初始化插件

func (*RuleBasedInstancesFilter) Name

func (g *RuleBasedInstancesFilter) Name() string

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

func (*RuleBasedInstancesFilter) Type

Type 插件类型

type RuleRouterConfig added in v1.5.8

type RuleRouterConfig struct {
	FailoverType string `yaml:"failoverType"`
	// contains filtered or unexported fields
}

func (*RuleRouterConfig) SetDefault added in v1.5.8

func (rc *RuleRouterConfig) SetDefault()

SetDefault 对关键值设置默认值

func (*RuleRouterConfig) Verify added in v1.5.8

func (rc *RuleRouterConfig) Verify() error

Verify 校验配置是否OK

Jump to

Keyboard shortcuts

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