gatewayapi

package
v1.25.0-rc.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CertificateRef

func CertificateRef(name, namespace string) gatewayapi_v1beta1.SecretObjectReference

func GRPCHeaderMatch added in v1.25.0

func GRPCHeaderMatch(matchType gatewayapi_v1beta1.HeaderMatchType, name, value string) []gatewayapi_v1alpha2.GRPCHeaderMatch

func GRPCMethodMatch added in v1.25.0

func GRPCMethodMatch(matchType gatewayapi_v1alpha2.GRPCMethodMatchType, service string, method string) *gatewayapi_v1alpha2.GRPCMethodMatch

func GRPCRouteBackendRef added in v1.25.0

func GRPCRouteBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1alpha2.GRPCBackendRef

func GatewayListenerParentRef

func GatewayListenerParentRef(namespace, name, listener string, port int) gatewayapi_v1beta1.ParentReference

func GatewayParentRef

func GatewayParentRef(namespace, name string) gatewayapi_v1beta1.ParentReference

func HTTPBackendRef

func HTTPBackendRef(serviceName string, port int, weight int32) []gatewayapi_v1beta1.HTTPBackendRef

func HTTPHeaderMatch

func HTTPHeaderMatch(matchType gatewayapi_v1beta1.HeaderMatchType, name, value string) []gatewayapi_v1beta1.HTTPHeaderMatch

func HTTPQueryParamMatches added in v1.22.0

func HTTPQueryParamMatches(namesAndValues map[string]string) []gatewayapi_v1beta1.HTTPQueryParamMatch

func HostnameDeref added in v1.21.0

func HostnameDeref(hostname *gatewayapi_v1beta1.Hostname) string

HostnameDeref returns the hostname as a string if it's not nil, or an empty string otherwise.

func IsRefToGateway added in v1.22.0

func IsRefToGateway(parentRef gatewayapi_v1beta1.ParentReference, gateway types.NamespacedName) bool

IsRefToGateway returns whether the provided parent ref is a reference to a Gateway with the given namespace/name, irrespective of whether a section/listener name has been specified (i.e. a parent ref to a listener on the specified gateway will return "true").

func IsValidHostname added in v1.21.0

func IsValidHostname(hostname string) error

IsValidHostname validates that a given hostname is syntactically valid. It returns nil if valid and an error if not valid.

func ServiceBackendObjectRef

func ServiceBackendObjectRef(name string, port int) gatewayapi_v1beta1.BackendObjectReference

func TLSRouteBackendRef

func TLSRouteBackendRef(serviceName string, port int, weight *int32) []gatewayapi_v1alpha2.BackendRef

func TLSRouteBackendRefs

func TLSRouteBackendRefs(backendRefs ...[]gatewayapi_v1alpha2.BackendRef) []gatewayapi_v1alpha2.BackendRef

Types

type ValidateListenersResult added in v1.21.0

type ValidateListenersResult struct {
	InsecurePort int
	SecurePort   int

	InvalidListenerConditions map[gatewayapi_v1beta1.SectionName]metav1.Condition
}

func ValidateListeners added in v1.21.0

func ValidateListeners(listeners []gatewayapi_v1beta1.Listener) ValidateListenersResult

ValidateListeners validates protocols, ports and hostnames on a set of listeners. It ensures that:

  • all protocols are supported
  • each listener group (grouped by protocol, with HTTPS & TLS going together) uses a single port
  • listener hostnames are syntactically valid
  • hostnames within each listener group are unique

It returns the insecure & secure ports to use, as well as conditions for all invalid listeners. If a listener is not in the "InvalidListenerConditions" map, it is assumed to be valid according to the above rules.

Jump to

Keyboard shortcuts

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