local

package
v1.5.7-rc1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

Pool separates same ip invoker from others.

func (*LocalPriorityRouter) Priority

func (r *LocalPriorityRouter) Priority() int64

Priority

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

Jump to

Keyboard shortcuts

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