healthcheck

package
v1.5.7-rc1-tmp Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

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, notify chan struct{}) (router.PriorityRouter, 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

GetCircuitTrippedTimeoutFactor return the circuitTrippedTimeoutFactor bound to this DefaultHealthChecker

func (*DefaultHealthChecker) GetOutStandingRequestCountLimit added in v1.5.1

func (c *DefaultHealthChecker) GetOutStandingRequestCountLimit() int32

GetOutStandingRequestCountLimit return the outStandingRequestConutLimit bound to this DefaultHealthChecker

func (*DefaultHealthChecker) GetRequestSuccessiveFailureThreshold

func (c *DefaultHealthChecker) GetRequestSuccessiveFailureThreshold() int32

GetRequestSuccessiveFailureThreshold 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) NewPriorityRouter added in v1.5.0

func (f *HealthCheckRouteFactory) NewPriorityRouter(url *common.URL, notify chan struct{}) (router.PriorityRouter, error)

NewPriorityRouter 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) Name added in v1.5.5

func (r *HealthCheckRouter) Name() string

func (*HealthCheckRouter) Pool added in v1.5.5

Pool separates healthy invokers from others.

func (*HealthCheckRouter) Priority

func (r *HealthCheckRouter) Priority() int64

Priority

func (*HealthCheckRouter) Route

func (r *HealthCheckRouter) Route(invokers *roaring.Bitmap, cache router.Cache, url *common.URL, invocation protocol.Invocation) *roaring.Bitmap

Route gets a list of healthy invoker

func (*HealthCheckRouter) ShouldPool added in v1.5.5

func (r *HealthCheckRouter) ShouldPool() bool

ShouldPool will always return true to make sure healthy check constantly.

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