v3

package
v1.27.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultCluster

func DefaultCluster(clusters ...*envoy_cluster_v3.Cluster) *envoy_cluster_v3.Cluster

DefaultCluster returns a copy of the default Cluster, with each Cluster given in the parameter slice merged on top. This makes it relatively fluent to compose Clusters by tweaking a few fields.

Types

type Contour

type Contour struct {
	*grpc.ClientConn
	*testing.T
	// contains filtered or unexported fields
}

func (*Contour) NoStatus

func (c *Contour) NoStatus(obj any) *Contour

NoStatus asserts that the given object did not get any status set.

func (*Contour) Request

func (c *Contour) Request(typeurl string, names ...string) *Response

func (*Contour) Status

func (c *Contour) Status(obj any) *StatusResult

Status returns a StatusResult object that can be used to assert on object status fields.

type ResourceEventHandlerWrapper added in v1.26.0

type ResourceEventHandlerWrapper interface {
	OnAdd(obj any)
	OnUpdate(oldObj, newObj any)
	OnDelete(obj any)
}

ResourceEventHandlerWrapper wraps the ResourceEventHandler interface from client-go/tools/cache. The OnAdd function has a boolean parameter that we do not need for testing.

type Response

type Response struct {
	*Contour
	*envoy_discovery_v3.DiscoveryResponse
}

func (*Response) Equals

Equals tests that the response retrieved from Contour is equal to the supplied value. TODO(youngnick) This function really should be copied to an `EqualResources` function.

type StatusResult added in v1.18.0

type StatusResult struct {
	*Contour

	Err  error
	Have *contour_api_v1.HTTPProxyStatus
}

func (*StatusResult) Equals added in v1.18.0

Equals asserts that the status result is not an error and matches the wanted status exactly.

func (*StatusResult) HasError added in v1.18.0

func (s *StatusResult) HasError(condType string, reason, message string) *Contour

HasError asserts that there is an error on the Valid Condition in the proxy that matches the given values.

func (*StatusResult) IsInvalid added in v1.18.0

func (s *StatusResult) IsInvalid() *Contour

IsInvalid asserts that the proxy's CurrentStatus field is equal to "invalid".

func (*StatusResult) IsValid added in v1.18.0

func (s *StatusResult) IsValid() *Contour

IsValid asserts that the proxy's CurrentStatus field is equal to "valid".

func (*StatusResult) Like added in v1.18.0

Like asserts that the status result is not an error and matches non-empty fields in the wanted status.

Jump to

Keyboard shortcuts

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