router

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

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 {

	// AddRouters Add routers
	AddRouters([]PriorityRouter)

	// SetInvokers notify router chain of the initial addresses from registry at the first time. Notify whenever addresses in registry change.
	SetInvokers(invokers []protocol.Invoker)
	// contains filtered or unexported methods
}

Chain

type FilePriorityRouterFactory added in v1.5.0

type FilePriorityRouterFactory interface {
	// NewFileRouters Create file router with config file
	NewFileRouter([]byte) (PriorityRouter, error)
}

FilePriorityRouterFactory creates priority router with 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 NotifyRouter added in v1.5.1

type NotifyRouter interface {
	PriorityRouter
	// Notify notify whenever addresses in registry change
	Notify([]protocol.Invoker)
}

NotifyRouter notify router use the invoker list. Invoker list may change from time to time. This method gives the router a chance to prepare before {@link Router#route(List, URL, Invocation)} gets called.

type PriorityRouter added in v1.5.0

type PriorityRouter interface {

	// Priority Return Priority in router
	// 0 to ^int(0) is better
	Priority() int64
	// contains filtered or unexported methods
}

Router

type PriorityRouterFactory added in v1.5.0

type PriorityRouterFactory interface {
	// NewPriorityRouter creates router instance with URL
	NewPriorityRouter(*common.URL) (PriorityRouter, error)
}

Extension - Router PriorityRouterFactory creates creates priority router with url

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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