Documentation
¶
Index ¶
- Constants
- func ComputeHosts(routeHostnames []string, listenerHostname *string) []string
- func GetBackendServiceName(bor gatewayv1.BackendObjectReference) (string, error)
- func IsBackendReferenceAllowed(originatingNamespace string, be gatewayv1.BackendRef, ...) bool
- func IsGateway(parent gatewayv1.ParentReference) bool
- func IsLocalConfigMap(be gatewayv1.LocalObjectReference) bool
- func IsLocalPolicyTargetService(be gatewayv1alpha2.LocalPolicyTargetReference) bool
- func IsLocalSecret(be gatewayv1.LocalObjectReference) bool
- func IsSecret(secret gatewayv1.SecretObjectReference) bool
- func IsService(be gatewayv1.BackendObjectReference) bool
- func MatchesControllerName[T ~string](v T) bool
- func NamespaceDerefOr(ns *gatewayv1.Namespace, defaultNamespace string) string
Constants ¶
const ( // ControllerDomain is the domain for this Gateway Controller. ControllerDomain gatewayv1.GatewayController = "caddyserver.com" // ControllerName is the name of this Gateway Controller, used in Gateway Classes. ControllerName = ControllerDomain + "/gateway-controller" )
Variables ¶
This section is empty.
Functions ¶
func ComputeHosts ¶
ComputeHosts returns a list of the intersecting hostnames between the route and the listener. The below function is inspired from https://github.com/envoyproxy/gateway/blob/main/internal/gatewayapi/helpers.go. Special thanks to Envoy team.
func GetBackendServiceName ¶
func GetBackendServiceName(bor gatewayv1.BackendObjectReference) (string, error)
GetBackendServiceName attempts to get the name of a Service from a BackendObjectReference. Returns an error if the BackendObjectReference doesn't reference a Service resource.
func IsBackendReferenceAllowed ¶
func IsBackendReferenceAllowed(originatingNamespace string, be gatewayv1.BackendRef, gvk schema.GroupVersionKind, grants []gatewayv1beta1.ReferenceGrant) bool
IsBackendReferenceAllowed returns true if the backend reference is allowed by the reference grant.
func IsGateway ¶
func IsGateway(parent gatewayv1.ParentReference) bool
IsGateway checks if the given ParentReference references a Gateway resource.
func IsLocalConfigMap ¶
func IsLocalConfigMap(be gatewayv1.LocalObjectReference) bool
IsLocalConfigMap checks if the given LocalObjectReference references a ConfigMap resource.
func IsLocalPolicyTargetService ¶ added in v0.1.0
func IsLocalPolicyTargetService(be gatewayv1alpha2.LocalPolicyTargetReference) bool
IsPolicyTargetService checks if the given PolicyTargetReference references a Service resource.
func IsLocalSecret ¶
func IsLocalSecret(be gatewayv1.LocalObjectReference) bool
IsLocalSecret checks if the given LocalObjectReference references a Secret resource.
func IsSecret ¶
func IsSecret(secret gatewayv1.SecretObjectReference) bool
IsSecret checks if the given SecretObjectReference references a Secret resource.
func IsService ¶
func IsService(be gatewayv1.BackendObjectReference) bool
IsService checks if the given BackendObjectReference references a Service resource.
func MatchesControllerName ¶
MatchesControllerName checks if the given string matches the name of our gateway controller.
Types ¶
This section is empty.
Directories
¶
Path | Synopsis |
---|---|
Package caddy .
|
Package caddy . |
Package routechecks .
|
Package routechecks . |