condition

package
v3.2.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAppConditionRouterFactory

func NewAppConditionRouterFactory() router.PriorityRouterFactory

NewAppConditionRouterFactory router factory

func NewServiceConditionRouterFactory

func NewServiceConditionRouterFactory() router.PriorityRouterFactory

NewServiceConditionRouterFactory constructs a new PriorityRouterFactory

Types

type AppConditionRouterFactory

type AppConditionRouterFactory struct {
}

AppConditionRouterFactory router factory

func (*AppConditionRouterFactory) NewPriorityRouter

func (a *AppConditionRouterFactory) NewPriorityRouter() (router.PriorityRouter, error)

NewPriorityRouter constructs a new ApplicationRouter

type ApplicationRouter

type ApplicationRouter struct {
	DynamicRouter
	// contains filtered or unexported fields
}

ApplicationRouter is Application level router

func NewApplicationRouter

func NewApplicationRouter() *ApplicationRouter

func (*ApplicationRouter) Notify

func (a *ApplicationRouter) Notify(invokers []protocol.Invoker)

func (*ApplicationRouter) Priority

func (a *ApplicationRouter) Priority() int64

type DynamicRouter

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

func (*DynamicRouter) Process

func (d *DynamicRouter) Process(event *config_center.ConfigChangeEvent)

func (*DynamicRouter) Route

func (d *DynamicRouter) Route(invokers []protocol.Invoker, url *common.URL, invocation protocol.Invocation) []protocol.Invoker

func (*DynamicRouter) URL

func (d *DynamicRouter) URL() *common.URL

type FieldMatcher

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

func NewFieldMatcher

func NewFieldMatcher(rule string) (FieldMatcher, error)

func (*FieldMatcher) MatchInvoker

func (m *FieldMatcher) MatchInvoker(url *common.URL, ivk protocol.Invoker, invocation protocol.Invocation) bool

func (*FieldMatcher) MatchRequest

func (m *FieldMatcher) MatchRequest(url *common.URL, invocation protocol.Invocation) bool

type MultiDestRouter

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

MultiDestRouter Multiply-Destination-Router

func NewConditionMultiDestRouter

func NewConditionMultiDestRouter(url *common.URL) (*MultiDestRouter, error)

func (MultiDestRouter) Route

func (m MultiDestRouter) Route(invokers []protocol.Invoker, url *common.URL, invocation protocol.Invocation) ([]protocol.Invoker, bool)

type ServiceRouteFactory

type ServiceRouteFactory struct{}

ServiceRouteFactory router factory

func (*ServiceRouteFactory) NewPriorityRouter

func (s *ServiceRouteFactory) NewPriorityRouter() (router.PriorityRouter, error)

NewPriorityRouter constructs a new ServiceRouter

type ServiceRouter

type ServiceRouter struct {
	DynamicRouter
}

ServiceRouter is Service level router

func NewServiceRouter

func NewServiceRouter() *ServiceRouter

func (*ServiceRouter) Notify

func (s *ServiceRouter) Notify(invokers []protocol.Invoker)

func (*ServiceRouter) Priority

func (s *ServiceRouter) Priority() int64

type StateRouter

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

func NewConditionStateRouter

func NewConditionStateRouter(url *common.URL) (*StateRouter, error)

func (*StateRouter) Route

func (s *StateRouter) Route(invokers []protocol.Invoker, url *common.URL, invocation protocol.Invocation) []protocol.Invoker

Route Determine the target invokers list. condition rule like `self_condition => peers_condition `

@return active_peers_invokers, Is_self_condition_match_success

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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