Documentation ¶
Index ¶
- func NewAppConditionRouterFactory() router.PriorityRouterFactory
- func NewServiceConditionRouterFactory() router.PriorityRouterFactory
- type AppConditionRouterFactory
- type ApplicationRouter
- type DynamicRouter
- type FieldMatcher
- type MultiDestRouter
- type ServiceRouteFactory
- type ServiceRouter
- type StateRouter
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)
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
Click to show internal directories.
Click to hide internal directories.