Documentation ¶
Index ¶
- func CompareEndpoints(cluster string, got []*endpointv3.LocalityLbEndpoints, want []LocLbEpInfo) error
- func CompareEndpointsOrFail(t *testing.T, cluster string, got []*endpointv3.LocalityLbEndpoints, ...)
- func Dump(t test.Failer, p proto.Message) string
- func DumpList[T any](t test.Failer, protoList []T) []string
- func EvaluateListenerFilterPredicates(predicate *listener.ListenerFilterChainMatchPredicate, port int) bool
- func ExtractCluster(name string, cc []*cluster.Cluster) *cluster.Cluster
- func ExtractClusterEndpoints(clusters []*cluster.Cluster) map[string][]string
- func ExtractClusterSecretResources(t test.Failer, c *cluster.Cluster) []string
- func ExtractClusters(cc []*cluster.Cluster) map[string]*cluster.Cluster
- func ExtractEdsClusterNames(cl []*cluster.Cluster) []string
- func ExtractEndpoints(cla *endpoint.ClusterLoadAssignment) []string
- func ExtractFilterChain(name string, l *listener.Listener) *listener.FilterChain
- func ExtractFilterChainNames(l *listener.Listener) []string
- func ExtractFilterNames(t test.Failer, fcs *listener.FilterChain) ([]string, []string)
- func ExtractHTTPConnectionManager(t test.Failer, fcs *listener.FilterChain) *hcm.HttpConnectionManager
- func ExtractHealthEndpoints(cla *endpoint.ClusterLoadAssignment) ([]string, []string)
- func ExtractListener(name string, ll []*listener.Listener) *listener.Listener
- func ExtractListenerFilters(l *listener.Listener) map[string]*listener.ListenerFilter
- func ExtractListenerNames(ll []*listener.Listener) []string
- func ExtractListenerSecretResources(t test.Failer, l *listener.Listener) []string
- func ExtractLoadAssignments(cla []*endpoint.ClusterLoadAssignment) map[string][]string
- func ExtractLocalityLbEndpoints(cla []*endpoint.ClusterLoadAssignment) map[string][]*endpoint.LocalityLbEndpoints
- func ExtractResource(res model.Resources) sets.String
- func ExtractRouteConfigurations(rc []*route.RouteConfiguration) map[string]*route.RouteConfiguration
- func ExtractRoutesFromListeners(ll []*listener.Listener) []string
- func ExtractSecretResources(t test.Failer, rs []*anypb.Any) []string
- func ExtractTCPProxy(t test.Failer, fcs *listener.FilterChain) *tcpproxy.TcpProxy
- func ExtractTLSSecrets(t test.Failer, secrets []*anypb.Any) map[string]*tls.Secret
- func ExtractVirtualHosts(rc *route.RouteConfiguration) map[string][]string
- func FilterClusters(cl []*cluster.Cluster, f func(c *cluster.Cluster) bool) []*cluster.Cluster
- func MapKeys[M ~map[string]V, V any](mp M) []string
- func SilentlyUnmarshalAny[T any](a *anypb.Any) *T
- func ToDiscoveryResponse[T proto.Message](p []T) *discovery.DiscoveryResponse
- func TypeName[T proto.Message]() string
- func UnmarshalAny[T any](t test.Failer, a *anypb.Any) *T
- func UnmarshalClusterLoadAssignment(t test.Failer, resp []*anypb.Any) []*endpoint.ClusterLoadAssignment
- func UnmarshalRouteConfiguration(t test.Failer, resp []*anypb.Any) []*route.RouteConfiguration
- func ValidateCluster(t testing.TB, c *cluster.Cluster)
- func ValidateClusterLoadAssignment(t testing.TB, l *endpoint.ClusterLoadAssignment)
- func ValidateClusterLoadAssignments(t testing.TB, ls []*endpoint.ClusterLoadAssignment)
- func ValidateClusters(t testing.TB, ls []*cluster.Cluster)
- func ValidateListener(t testing.TB, l *listener.Listener)
- func ValidateListeners(t testing.TB, ls []*listener.Listener)
- func ValidateRoute(t testing.TB, r *route.Route)
- func ValidateRouteConfiguration(t testing.TB, l *route.RouteConfiguration)
- func ValidateRouteConfigurations(t testing.TB, ls []*route.RouteConfiguration)
- func ValidateRoutes(t testing.TB, ls []*route.Route)
- type LbEpInfo
- type LocLbEpInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareEndpoints ¶
func CompareEndpoints(cluster string, got []*endpointv3.LocalityLbEndpoints, want []LocLbEpInfo) error
func CompareEndpointsOrFail ¶
func CompareEndpointsOrFail(t *testing.T, cluster string, got []*endpointv3.LocalityLbEndpoints, want []LocLbEpInfo)
func EvaluateListenerFilterPredicates ¶
func EvaluateListenerFilterPredicates(predicate *listener.ListenerFilterChainMatchPredicate, port int) bool
EvaluateListenerFilterPredicates runs through the ListenerFilterChainMatchPredicate logic This is exposed for testing only, and should not be used in XDS generation code
func ExtractClusterEndpoints ¶
func ExtractEdsClusterNames ¶
func ExtractEndpoints ¶
func ExtractEndpoints(cla *endpoint.ClusterLoadAssignment) []string
ExtractEndpoints returns all endpoints in the load assignment (including unhealthy endpoints)
func ExtractFilterChain ¶
func ExtractFilterChain(name string, l *listener.Listener) *listener.FilterChain
func ExtractFilterChainNames ¶
func ExtractFilterNames ¶
func ExtractHTTPConnectionManager ¶
func ExtractHTTPConnectionManager(t test.Failer, fcs *listener.FilterChain) *hcm.HttpConnectionManager
func ExtractHealthEndpoints ¶
func ExtractHealthEndpoints(cla *endpoint.ClusterLoadAssignment) ([]string, []string)
ExtractHealthEndpoints returns all health and unhealth endpoints
func ExtractListener ¶
func ExtractListenerFilters ¶
func ExtractListenerFilters(l *listener.Listener) map[string]*listener.ListenerFilter
func ExtractListenerNames ¶
func ExtractLoadAssignments ¶
func ExtractLoadAssignments(cla []*endpoint.ClusterLoadAssignment) map[string][]string
func ExtractLocalityLbEndpoints ¶
func ExtractLocalityLbEndpoints(cla []*endpoint.ClusterLoadAssignment) map[string][]*endpoint.LocalityLbEndpoints
func ExtractRouteConfigurations ¶
func ExtractRouteConfigurations(rc []*route.RouteConfiguration) map[string]*route.RouteConfiguration
func ExtractSecretResources ¶
ExtractSecretResources fetches all referenced SDS resource names from a list of clusters and listeners
func ExtractTCPProxy ¶
func ExtractTLSSecrets ¶
func ExtractVirtualHosts ¶
func ExtractVirtualHosts(rc *route.RouteConfiguration) map[string][]string
func FilterClusters ¶
func SilentlyUnmarshalAny ¶
func ToDiscoveryResponse ¶
func ToDiscoveryResponse[T proto.Message](p []T) *discovery.DiscoveryResponse
func ValidateClusterLoadAssignment ¶
func ValidateClusterLoadAssignment(t testing.TB, l *endpoint.ClusterLoadAssignment)
func ValidateClusterLoadAssignments ¶
func ValidateClusterLoadAssignments(t testing.TB, ls []*endpoint.ClusterLoadAssignment)
func ValidateRouteConfiguration ¶
func ValidateRouteConfiguration(t testing.TB, l *route.RouteConfiguration)
func ValidateRouteConfigurations ¶
func ValidateRouteConfigurations(t testing.TB, ls []*route.RouteConfiguration)
Types ¶
type LocLbEpInfo ¶
func (LocLbEpInfo) GetAddrs ¶
func (i LocLbEpInfo) GetAddrs() []string
Click to show internal directories.
Click to hide internal directories.