routing

package
v1.17.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MatchAll = "*"
)

Variables

This section is empty.

Functions

func BuildInBoundsFromV2

func BuildInBoundsFromV2(service, namespace string, item *model.ExtendRouterConfig) []*apitraffic.Route

BuildInBoundsFromV2 Convert the routing rules of V2 to the inbounds in the routing rule of V1

func BuildOutBoundsFromV2

func BuildOutBoundsFromV2(service, namespace string, item *model.ExtendRouterConfig) []*apitraffic.Route

BuildOutBoundsFromV2 According to the routing rules of the V2 version, it is adapted to the outbounds in the routing rule of V1 version

func BuildV1RoutesFromV2

func BuildV1RoutesFromV2(service, namespace string,
	entries []*model.ExtendRouterConfig) ([]*apitraffic.Route, []*apitraffic.Route, []string)

BuildV1RoutesFromV2 According to the routing rules of the V2 version, it is adapted to the V1 version of the routing rules. return inBound outBound revisions

func BuildV2ExtendRouting

func BuildV2ExtendRouting(req *apitraffic.Routing, route *apitraffic.Route) (*model.ExtendRouterConfig, error)

BuildV2ExtendRouting Build the internal data object routing rules of V2 version

func BuildV2RoutingFromV1Route

func BuildV2RoutingFromV1Route(req *apitraffic.Routing, route *apitraffic.Route) (*apitraffic.RouteRule, error)

BuildV2RoutingFromV1Route Build a V2 version of API data object routing rules

func CompareRoutingV2

func CompareRoutingV2(a, b *model.ExtendRouterConfig) bool

CompareRoutingV2 Compare the priority of two routing.

func CompositeRoutingV1AndV2

func CompositeRoutingV1AndV2(v1rule *apitraffic.Routing, level1, level2,
	level3 []*model.ExtendRouterConfig) (*apitraffic.Routing, []string)

CompositeRoutingV1AndV2 The routing rules of the V1 version and the rules of the V2 version

func ConvertRoutingV1ToExtendV2

func ConvertRoutingV1ToExtendV2(svcName, svcNamespace string,
	rule *model.RoutingConfig) ([]*model.ExtendRouterConfig, []*model.ExtendRouterConfig, error)

ConvertRoutingV1ToExtendV2 The routing rules of the V1 version are converted to V2 version for storage TODO Reduce duplicate code logic

func RoutingArguments2Labels

func RoutingArguments2Labels(args []*apitraffic.SourceMatch) map[string]*apimodel.MatchString

RoutingArguments2Labels Adapt the parameter list to the old label model

func RoutingConfigV1ToAPI

func RoutingConfigV1ToAPI(req *model.RoutingConfig, service string, namespace string) (*apitraffic.Routing, error)

RoutingConfigV1ToAPI Convert the internal data structure to API parameter to pass out

func RoutingLabels2Arguments

func RoutingLabels2Arguments(labels map[string]*apimodel.MatchString) []*apitraffic.SourceMatch

RoutingLabels2Arguments Adapting the old label model into a list of parameters

Types

This section is empty.

Jump to

Keyboard shortcuts

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