Documentation ¶
Index ¶
Constants ¶
const (
HEALTH_ROUTE_ENABLED_KEY = "health.route.enabled"
)
Variables ¶
This section is empty.
Functions ¶
func NewDefaultHealthChecker ¶
func NewDefaultHealthChecker(url *common.URL) router.HealthChecker
NewDefaultHealthChecker constructs a new DefaultHealthChecker based on the url
Types ¶
type DefaultHealthChecker ¶
type DefaultHealthChecker struct {
// contains filtered or unexported fields
}
DefaultHealthChecker is the default implementation of HealthChecker, which determines the health status of the invoker based on the number of successive bad request and the current active request.
func (*DefaultHealthChecker) GetCircuitTrippedTimeoutFactor ¶
func (c *DefaultHealthChecker) GetCircuitTrippedTimeoutFactor() int32
GetOutStandingRequestConutLimit return the circuitTrippedTimeoutFactor bound to this DefaultHealthChecker
func (*DefaultHealthChecker) GetOutStandingRequestConutLimit ¶
func (c *DefaultHealthChecker) GetOutStandingRequestConutLimit() int32
GetOutStandingRequestConutLimit return the outStandingRequestConutLimit bound to this DefaultHealthChecker
func (*DefaultHealthChecker) GetRequestSuccessiveFailureThreshold ¶
func (c *DefaultHealthChecker) GetRequestSuccessiveFailureThreshold() int32
GetOutStandingRequestConutLimit return the requestSuccessiveFailureThreshold bound to this DefaultHealthChecker
type HealthCheckRouter ¶
type HealthCheckRouter struct {
// contains filtered or unexported fields
}
HealthCheckRouter provides a health-first routing mechanism through HealthChecker
func (*HealthCheckRouter) HealthyChecker ¶
func (r *HealthCheckRouter) HealthyChecker() router.HealthChecker
HealthyChecker returns the HealthChecker bound to this HealthCheckRouter
func (*HealthCheckRouter) Route ¶
func (r *HealthCheckRouter) Route(invokers []protocol.Invoker, url *common.URL, invocation protocol.Invocation) []protocol.Invoker
Route gets a list of healthy invoker
func (*HealthCheckRouter) URL ¶
func (r *HealthCheckRouter) URL() common.URL
URL Return URL in router