virtualservice

package
v0.12.8 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoutesBySpecificity

type RoutesBySpecificity []*networkingv1alpha3spec.HTTPRoute

func (RoutesBySpecificity) Len

func (b RoutesBySpecificity) Len() int

func (RoutesBySpecificity) Less

func (b RoutesBySpecificity) Less(i, j int) bool

func (RoutesBySpecificity) Swap

func (b RoutesBySpecificity) Swap(i, j int)

type Translator

type Translator interface {
	/*
		Translate translates the appropriate VirtualService for the given TrafficTarget.
		returns nil if no VirtualService is required for the TrafficTarget (i.e. if no VirtualService features are required, such as subsets).

		If sourceMeshInstallation is specified, hostnames in the translated VirtualService will use global FQDNs if the trafficTarget
		exists in a different cluster from the specified mesh (i.e. is a federated traffic target). Otherwise, assume translation
		for cluster that the trafficTarget exists in and use local FQDNs.

		Errors caused by invalid user config will be reported using the Reporter.

		Note that the input snapshot TrafficTargetSet contains the given TrafficTarget.
	*/
	Translate(
		ctx context.Context,
		in input.LocalSnapshot,
		trafficTarget *discoveryv1alpha2.TrafficTarget,
		sourceMeshInstallation *discoveryv1alpha2.MeshSpec_MeshInstallation,
		reporter reporting.Reporter,
	) *networkingv1alpha3.VirtualService
}

the VirtualService translator translates a TrafficTarget into a VirtualService.

func NewTranslator

func NewTranslator(
	userVirtualServices v1alpha3sets.VirtualServiceSet,
	clusterDomains hostutils.ClusterDomainRegistry,
	decoratorFactory decorators.Factory,
) Translator

Directories

Path Synopsis
Package mock_virtualservice is a generated GoMock package.
Package mock_virtualservice is a generated GoMock package.

Jump to

Keyboard shortcuts

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