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.PriorityRouter)
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(invokers []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.
func (*RouterChain) SetInvokers ¶ added in v1.5.1
func (c *RouterChain) SetInvokers(invokers []protocol.Invoker)
SetInvokers notify router chain of the initial addresses from registry at the first time. Notify whenever addresses in registry change.
func (*RouterChain) URL ¶ added in v1.5.0
func (c *RouterChain) URL() common.URL
URL Return URL in RouterChain
Click to show internal directories.
Click to hide internal directories.