helper_test

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateObject

func CreateObject(cfg string) runtime.Object

CreateObject ...

func CreateSecret added in v0.13.0

func CreateSecret(secretName string) *api.Secret

CreateSecret ...

func CreateService

func CreateService(name, port, endpoints string) (*api.Service, *api.Endpoints, []*discoveryv1.EndpointSlice)

CreateService ...

func MarshalBackends added in v0.13.0

func MarshalBackends(habackends ...*hatypes.Backend) string

MarshalBackends ...

func MarshalBackendsWeight added in v0.13.0

func MarshalBackendsWeight(habackends ...*hatypes.Backend) string

MarshalBackendsWeight ...

func MarshalHost added in v0.13.0

func MarshalHost(hafront *hatypes.Host) string

MarshalHost ...

func MarshalHosts added in v0.13.0

func MarshalHosts(hafronts ...*hatypes.Host) string

MarshalHosts ...

func MarshalTCPServices added in v0.13.0

func MarshalTCPServices(hatcpserviceports ...*hatypes.TCPServicePort) string

MarshalTCPServices ...

Types

type CacheMock

type CacheMock struct {
	Changed *convtypes.ChangedObjects
	//
	IngList      []*networking.Ingress
	IngClassList []*networking.IngressClass
	SvcList      []*api.Service
	//
	GatewayA1List      []*gatewayv1alpha1.Gateway
	GatewayA1ClassList []*gatewayv1alpha1.GatewayClass
	HTTPRouteA1List    []*gatewayv1alpha1.HTTPRoute
	//
	GatewayList      map[string]*gatewayv1alpha2.Gateway
	GatewayClassList []*gatewayv1alpha2.GatewayClass
	HTTPRouteList    []*gatewayv1alpha2.HTTPRoute
	//
	NsList        map[string]*api.Namespace
	LookupList    map[string][]net.IP
	EpList        map[string]*api.Endpoints
	EpsList       map[string][]*discoveryv1.EndpointSlice
	ConfigMapList map[string]*api.ConfigMap
	TermPodList   map[string][]*api.Pod
	PodList       map[string]*api.Pod
	SecretTLSPath map[string]string
	SecretCAPath  map[string]string
	SecretCRLPath map[string]string
	SecretDHPath  map[string]string
	SecretContent SecretContent
	// contains filtered or unexported fields
}

CacheMock ...

func NewCacheMock

func NewCacheMock(tracker convtypes.Tracker) *CacheMock

NewCacheMock ...

func (*CacheMock) ExternalNameLookup added in v0.10.9

func (c *CacheMock) ExternalNameLookup(externalName string) ([]net.IP, error)

ExternalNameLookup ...

func (*CacheMock) GetCASecretPath

func (c *CacheMock) GetCASecretPath(defaultNamespace, secretName string, track []convtypes.TrackingRef) (ca, crl convtypes.File, err error)

GetCASecretPath ...

func (*CacheMock) GetConfigMap added in v0.12.1

func (c *CacheMock) GetConfigMap(configMapName string) (*api.ConfigMap, error)

GetConfigMap ...

func (*CacheMock) GetDHSecretPath

func (c *CacheMock) GetDHSecretPath(defaultNamespace, secretName string) (convtypes.File, error)

GetDHSecretPath ...

func (*CacheMock) GetEndpointSlices added in v0.14.3

func (c *CacheMock) GetEndpointSlices(service *api.Service) ([]*discoveryv1.EndpointSlice, error)

func (*CacheMock) GetEndpoints

func (c *CacheMock) GetEndpoints(service *api.Service) (*api.Endpoints, error)

GetEndpoints ...

func (*CacheMock) GetGatewayA1 added in v0.14.0

func (c *CacheMock) GetGatewayA1(gatewayName string) (*gatewayv1alpha1.Gateway, error)

GetGatewayA1 ...

func (*CacheMock) GetGatewayA1List added in v0.14.0

func (c *CacheMock) GetGatewayA1List() ([]*gatewayv1alpha1.Gateway, error)

GetGatewayA1List ...

func (*CacheMock) GetGatewayMap added in v0.14.0

func (c *CacheMock) GetGatewayMap() (map[string]*gatewayv1alpha2.Gateway, error)

GetGatewayMap ...

func (*CacheMock) GetHTTPRouteA1List added in v0.14.0

func (c *CacheMock) GetHTTPRouteA1List(namespace string, match map[string]string) ([]*gatewayv1alpha1.HTTPRoute, error)

GetHTTPRouteA1List ...

func (*CacheMock) GetHTTPRouteList added in v0.13.0

func (c *CacheMock) GetHTTPRouteList() ([]*gatewayv1alpha2.HTTPRoute, error)

GetHTTPRouteList ...

func (*CacheMock) GetIngress added in v0.11.1

func (c *CacheMock) GetIngress(ingressName string) (*networking.Ingress, error)

GetIngress ...

func (*CacheMock) GetIngressClass added in v0.12.1

func (c *CacheMock) GetIngressClass(className string) (*networking.IngressClass, error)

GetIngressClass ...

func (*CacheMock) GetIngressList added in v0.11.1

func (c *CacheMock) GetIngressList() ([]*networking.Ingress, error)

GetIngressList ...

func (*CacheMock) GetNamespace added in v0.14.0

func (c *CacheMock) GetNamespace(name string) (*api.Namespace, error)

GetNamespace ...

func (*CacheMock) GetPasswdSecretContent added in v0.13.0

func (c *CacheMock) GetPasswdSecretContent(defaultNamespace, secretName string, track []convtypes.TrackingRef) ([]byte, error)

GetPasswdSecretContent ...

func (*CacheMock) GetPod

func (c *CacheMock) GetPod(podName string) (*api.Pod, error)

GetPod ...

func (*CacheMock) GetPodNamespace added in v0.12.1

func (c *CacheMock) GetPodNamespace() string

GetPodNamespace ...

func (*CacheMock) GetService

func (c *CacheMock) GetService(defaultNamespace, serviceName string) (*api.Service, error)

GetService ...

func (*CacheMock) GetTLSSecretPath

func (c *CacheMock) GetTLSSecretPath(defaultNamespace, secretName string, track []convtypes.TrackingRef) (convtypes.CrtFile, error)

GetTLSSecretPath ...

func (*CacheMock) GetTerminatingPods

func (c *CacheMock) GetTerminatingPods(service *api.Service, track []convtypes.TrackingRef) ([]*api.Pod, error)

GetTerminatingPods ...

func (*CacheMock) NeedFullSync added in v0.11.1

func (c *CacheMock) NeedFullSync() bool

NeedFullSync ...

func (*CacheMock) SwapChangedObjects added in v0.11.1

func (c *CacheMock) SwapChangedObjects() *convtypes.ChangedObjects

SwapChangedObjects ...

type SecretContent

type SecretContent map[string]map[string][]byte

SecretContent ...

Jump to

Keyboard shortcuts

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