healthcheck

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
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

func NewHealthCheckRouter

func NewHealthCheckRouter(url *common.URL) (router.Router, error)

NewHealthCheckRouter construct an HealthCheckRouter via 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

func (*DefaultHealthChecker) IsHealthy

func (c *DefaultHealthChecker) IsHealthy(invoker protocol.Invoker) bool

IsHealthy evaluates the healthy state on the given Invoker based on the number of successive bad request and the current active request

type HealthCheckRouteFactory

type HealthCheckRouteFactory struct {
}

HealthCheckRouteFactory

func (*HealthCheckRouteFactory) NewRouter

func (f *HealthCheckRouteFactory) NewRouter(url *common.URL) (router.Router, error)

NewRouter construct a new NewHealthCheckRouter via url

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) Priority

func (r *HealthCheckRouter) Priority() int64

Priority

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

Jump to

Keyboard shortcuts

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