chain

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2020 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

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 RouterChain

type RouterChain struct {
	// contains filtered or unexported fields
}

RouterChain Router chain

func NewRouterChain

func NewRouterChain(url *common.URL) (*RouterChain, error)

NewRouterChain Use url to init router chain Loop routerFactories and call NewRouter method

func (*RouterChain) AddRouters

func (c *RouterChain) AddRouters(routers []router.Router)

AddRouters Add routers to router chain New a array add builtinRouters which is not sorted in RouterChain and routers Sort the array Replace router array in RouterChain

func (*RouterChain) Route

func (c *RouterChain) Route(invoker []protocol.Invoker, url *common.URL, invocation protocol.Invocation) []protocol.Invoker

Route Loop routers in RouterChain and call Route method to determine the target invokers list.

Jump to

Keyboard shortcuts

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