Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseRouterRule ¶ added in v1.4.0
type BaseRouterRule struct {
RawRule string
Runtime bool
Force bool
Valid bool
Enabled bool
Priority int
Dynamic bool
Scope string
Key string
}
BaseRouterRule
type Chain ¶ added in v1.4.0
type Chain interface {
// Route Determine the target invokers list with chain.
Route([]protocol.Invoker, *common.URL, protocol.Invocation) []protocol.Invoker
// AddRouters Add routers
AddRouters([]Router)
}
Chain
type FIleRouterFactory ¶ added in v1.4.0
type FIleRouterFactory interface {
// NewFileRouters Create file router with config file
NewFileRouter([]byte) (Router, error)
}
RouterFactory Router create factory use for parse config file
type HealthChecker ¶ added in v1.4.0
type HealthChecker interface {
// IsHealthy evaluates the healthy state on the given Invoker
IsHealthy(invoker protocol.Invoker) bool
}
HealthChecker is used to determine whether the invoker is healthy or not
type Router ¶ added in v1.4.0
type Router interface {
// Route Determine the target invokers list.
Route([]protocol.Invoker, *common.URL, protocol.Invocation) []protocol.Invoker
// Priority Return Priority in router
// 0 to ^int(0) is better
Priority() int64
// URL Return URL in router
URL() common.URL
}
Router
Click to show internal directories.
Click to hide internal directories.