router

package
v1.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 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 {
	// 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