v3router

package
v3.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUniformRouterChain

func NewUniformRouterChain(virtualServiceConfig, destinationRuleConfig []byte, notify chan struct{}) (router.PriorityRouter, error)

NewUniformRouterChain return

func NewUniformRouterFactory

func NewUniformRouterFactory() router.PriorityRouterFactory

NewUniformRouterFactory constructs a new PriorityRouterFactory

Types

type DubboRouterRule

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

nolint

type RouterChain

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

RouterChain contains all uniform router logic it has UniformRouter list,

func (*RouterChain) Name

func (r *RouterChain) Name() string

Name get name of ConnCheckerRouter

func (*RouterChain) Priority

func (r *RouterChain) Priority() int64

Priority get Router priority level

func (*RouterChain) Process

func (r *RouterChain) Process(event *config_center.ConfigChangeEvent)

func (*RouterChain) Route

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

Route route invokers using RouterChain's routers one by one

func (*RouterChain) URL

func (r *RouterChain) URL() *common.URL

URL Return URL in router

type UniformRouteFactory

type UniformRouteFactory struct{}

UniformRouteFactory is uniform router's factory

func (*UniformRouteFactory) NewPriorityRouter

func (f *UniformRouteFactory) NewPriorityRouter(vsConfigBytes, distConfigBytes []byte, notify chan struct{}) (router.PriorityRouter, error)

NewPriorityRouter construct a new UniformRouteFactory as PriorityRouter

type UniformRouter

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

UniformRouter have

func NewUniformRouter

func NewUniformRouter(dubboRouter *DubboRouterRule, notify chan struct{}) (*UniformRouter, error)

NewUniformRouter construct an NewConnCheckRouter via url

func (*UniformRouter) Name

func (r *UniformRouter) Name() string

Name get name of ConnCheckerRouter

func (*UniformRouter) Priority

func (r *UniformRouter) Priority() int64

Priority get Router priority level

func (*UniformRouter) Process

func (r *UniformRouter) Process(event *config_center.ConfigChangeEvent)

Process there is no process needs for uniform Router, as it upper struct RouterChain has done it

func (*UniformRouter) Route

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

Route gets a list of routed invoker

func (*UniformRouter) URL

func (r *UniformRouter) URL() *common.URL

URL Return URL in router

type UniformRule

type UniformRule struct {
	DestinationLabelListMap map[string]map[string]string
	// contains filtered or unexported fields
}

UniformRule

type VirtualServiceRule

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

VirtualServiceRule is item of virtual service, it aims at judge if invocation context match it's condition, and if match, get result destination key, which should be defined in DestinationRule yaml file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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