router

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: Apache-2.0 Imports: 2 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

type RouterFactory added in v1.4.0

type RouterFactory interface {
	// NewRouter Create router instance with URL
	NewRouter(*common.URL) (Router, error)
}

RouterFactory Router create factory

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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