Documentation ¶
Index ¶
- Constants
- func NeedZeroProtect(lastBeat, beatTime, ttl int64) bool
- type ZeroProtectFilter
- func (g *ZeroProtectFilter) Destroy() error
- func (g *ZeroProtectFilter) Enable(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters) bool
- func (g *ZeroProtectFilter) GetFilteredInstances(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters, ...) (*servicerouter.RouteResult, error)
- func (g *ZeroProtectFilter) Init(ctx *plugin.InitContext) error
- func (g *ZeroProtectFilter) Name() string
- func (g *ZeroProtectFilter) Type() common.Type
Constants ¶
View Source
const (
MetadataInstanceLastHeartbeatTime = "internal-lastheartbeat"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ZeroProtectFilter ¶
type ZeroProtectFilter struct { *plugin.PluginBase // contains filtered or unexported fields }
ZeroProtectFilter 基于路由规则的服务实例过滤器
func (*ZeroProtectFilter) Destroy ¶
func (g *ZeroProtectFilter) Destroy() error
Destroy 销毁插件,可用于释放资源
func (*ZeroProtectFilter) Enable ¶
func (g *ZeroProtectFilter) Enable(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters) bool
Enable 是否需要启动规则路由
func (*ZeroProtectFilter) GetFilteredInstances ¶
func (g *ZeroProtectFilter) GetFilteredInstances(routeInfo *servicerouter.RouteInfo, clusters model.ServiceClusters, withinCluster *model.Cluster) (*servicerouter.RouteResult, error)
GetFilteredInstances 插件模式进行服务实例过滤,并返回过滤后的实例列表
func (*ZeroProtectFilter) Init ¶
func (g *ZeroProtectFilter) Init(ctx *plugin.InitContext) error
Init 初始化插件
Click to show internal directories.
Click to hide internal directories.