testutils

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type Manager

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

func (*Manager) GetPostXDSHookClient

func (m *Manager) GetPostXDSHookClient(xdsHookType v1alpha1.XDSTranslatorHook) extType.XDSHookClient

func (*Manager) GetPreXDSHookClient

func (m *Manager) GetPreXDSHookClient(xdsHookType v1alpha1.XDSTranslatorHook) extType.XDSHookClient

func (*Manager) HasExtension

func (m *Manager) HasExtension(g v1.Group, k v1.Kind) bool

type XDSHookClient

type XDSHookClient struct{}

func (*XDSHookClient) PostHTTPListenerModifyHook

func (c *XDSHookClient) PostHTTPListenerModifyHook(l *listenerV3.Listener) (*listenerV3.Listener, error)

PostHTTPListenerModifyHook returns a modified version of the listener with a changed statprefix of the listener A more useful use-case for an extension would be looping through the FilterChains to find the HTTPConnectionManager(s) and inject a custom HTTPFilter, but that for testing purposes we don't need to make a complex change

func (*XDSHookClient) PostRouteModifyHook

func (c *XDSHookClient) PostRouteModifyHook(route *routeV3.Route, routeHostnames []string, extensionResources []*unstructured.Unstructured) (*routeV3.Route, error)

PostRouteModifyHook returns a modified version of the route using context info and the passed in extensionResources

func (*XDSHookClient) PostTranslateModifyHook

func (c *XDSHookClient) PostTranslateModifyHook(clusters []*clusterV3.Cluster, secrets []*tlsV3.Secret) ([]*clusterV3.Cluster, []*tlsV3.Secret, error)

PostTranslateModifyHook inserts and overrides some clusters/secrets

func (*XDSHookClient) PostVirtualHostModifyHook

func (c *XDSHookClient) PostVirtualHostModifyHook(vh *routeV3.VirtualHost) (*routeV3.VirtualHost, error)

PostVirtualHostModifyHook returns a modified version of the virtualhost with a new route injected

Jump to

Keyboard shortcuts

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