Documentation ¶
Index ¶
- func NewLocalPriorityRouter(url *common.URL) (router.PriorityRouter, error)
- type LocalPriorityRouteFactory
- type LocalPriorityRouter
- func (r *LocalPriorityRouter) Name() string
- func (r *LocalPriorityRouter) Pool(invokers []protocol.Invoker) (router.AddrPool, router.AddrMetadata)
- func (r *LocalPriorityRouter) Priority() int64
- func (r *LocalPriorityRouter) Route(invokers *roaring.Bitmap, cache router.Cache, url *common.URL, ...) *roaring.Bitmap
- func (r *LocalPriorityRouter) ShouldPool() bool
- func (r *LocalPriorityRouter) URL() *common.URL
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocalPriorityRouter ¶
func NewLocalPriorityRouter(url *common.URL) (router.PriorityRouter, error)
NewLocalPriorityRouter construct an LocalPriorityRouter via url
Types ¶
type LocalPriorityRouteFactory ¶
type LocalPriorityRouteFactory struct { }
LocalPriorityRouteFactory
func (*LocalPriorityRouteFactory) NewPriorityRouter ¶
func (f *LocalPriorityRouteFactory) NewPriorityRouter(url *common.URL, notify chan struct{}) (router.PriorityRouter, error)
NewPriorityRouter construct a new NewLocalDiscRouter via url
type LocalPriorityRouter ¶
type LocalPriorityRouter struct {
// contains filtered or unexported fields
}
LocalPriorityRouter provides a ip-same-first routing logic if there is not provider with same ip as consumer, it would not filter any invoker if exists same ip invoker, it would retains this invoker only
func (*LocalPriorityRouter) Name ¶
func (r *LocalPriorityRouter) Name() string
func (*LocalPriorityRouter) Pool ¶
func (r *LocalPriorityRouter) Pool(invokers []protocol.Invoker) (router.AddrPool, router.AddrMetadata)
Pool separates same ip invoker from others.
func (*LocalPriorityRouter) Route ¶
func (r *LocalPriorityRouter) Route(invokers *roaring.Bitmap, cache router.Cache, url *common.URL, invocation protocol.Invocation) *roaring.Bitmap
Route gets a list of match-logic invoker
func (*LocalPriorityRouter) ShouldPool ¶
func (r *LocalPriorityRouter) ShouldPool() bool
ShouldPool will always return true to make sure local call logic constantly.
func (*LocalPriorityRouter) URL ¶
func (r *LocalPriorityRouter) URL() *common.URL
URL Return URL in router
Click to show internal directories.
Click to hide internal directories.