Documentation ¶
Index ¶
- Constants
- func DowngradeBackendRef(old v1beta1.BackendRef) v1alpha2.BackendRef
- func DowngradeParentReference(old v1beta1.ParentReference) v1alpha2.ParentReference
- func DowngradeRouteParentStatuses(routeParentStatuses []v1beta1.RouteParentStatus) []v1alpha2.RouteParentStatus
- func FromNamespacesPtr(fromNamespaces v1beta1.FromNamespaces) *v1beta1.FromNamespaces
- func GatewayAddressTypePtr(addr v1beta1.AddressType) *v1beta1.AddressType
- func GatewayOwnerLabels(namespace, name string) map[string]string
- func GroupDerefOr(group *v1beta1.Group, defaultGroup string) string
- func GroupPtr(name string) *v1beta1.Group
- func GroupPtrV1Alpha2(group string) *v1alpha2.Group
- func HasReadyListener(listeners []*ListenerContext) bool
- func HeaderMatchTypeDerefOr(matchType *v1beta1.HeaderMatchType, defaultType v1beta1.HeaderMatchType) v1beta1.HeaderMatchType
- func Int32Ptr(val int32) *int32
- func IsAuthnHTTPFilter(filter *v1beta1.HTTPRouteFilter) bool
- func IsRateLimitHTTPFilter(filter *v1beta1.HTTPRouteFilter) bool
- func IsRefToGateway(parentRef v1beta1.ParentReference, gateway types.NamespacedName) bool
- func KindPtr(name string) *v1beta1.Kind
- func KindPtrV1Alpha2(kind string) *v1alpha2.Kind
- func NamespaceDerefOr(namespace *v1beta1.Namespace, defaultNamespace string) string
- func NamespaceDerefOrAlpha(namespace *v1alpha2.Namespace, defaultNamespace string) string
- func NamespacePtr(name string) *v1beta1.Namespace
- func NamespacePtrV1Alpha2(namespace string) *v1alpha2.Namespace
- func ObjectNamePtr(val string) *v1alpha2.ObjectName
- func PathMatchTypeDerefOr(matchType *v1beta1.PathMatchType, defaultType v1beta1.PathMatchType) v1beta1.PathMatchType
- func PathMatchTypePtr(pType v1beta1.PathMatchType) *v1beta1.PathMatchType
- func PortNumPtr(val int32) *v1beta1.PortNumber
- func PortNumPtrV1Alpha2(port int) *v1alpha2.PortNumber
- func QueryParamMatchTypeDerefOr(matchType *v1beta1.QueryParamMatchType, ...) v1beta1.QueryParamMatchType
- func SectionNamePtr(name string) *v1beta1.SectionName
- func SectionNamePtrV1Alpha2(sectionName string) *v1alpha2.SectionName
- func StringPtr(val string) *string
- func TLSModeTypePtr(mode v1beta1.TLSModeType) *v1beta1.TLSModeType
- func UpgradeBackendRef(old v1alpha2.BackendRef) v1beta1.BackendRef
- func UpgradeParentReference(old v1alpha2.ParentReference) v1beta1.ParentReference
- func UpgradeParentReferences(old []v1alpha2.ParentReference) []v1beta1.ParentReference
- func UpgradeRouteParentStatuses(routeParentStatuses []v1alpha2.RouteParentStatus) []v1beta1.RouteParentStatus
- func ValidateGRPCRouteFilter(filter *v1alpha2.GRPCRouteFilter) error
- func ValidateHTTPRouteFilter(filter *v1beta1.HTTPRouteFilter) error
- type FiltersTranslator
- type GRPCRouteContext
- func (g *GRPCRouteContext) GetHostnames() []string
- func (g *GRPCRouteContext) GetParentReferences() []v1beta1.ParentReference
- func (g *GRPCRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
- func (g *GRPCRouteContext) GetRouteStatus() *v1beta1.RouteStatus
- func (g *GRPCRouteContext) GetRouteType() string
- type GatewayContext
- type HTTPFilterIR
- type HTTPFiltersContext
- type HTTPFiltersTranslator
- type HTTPRouteContext
- func (h *HTTPRouteContext) GetHostnames() []string
- func (h *HTTPRouteContext) GetParentReferences() []v1beta1.ParentReference
- func (h *HTTPRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
- func (h *HTTPRouteContext) GetRouteStatus() *v1beta1.RouteStatus
- func (h *HTTPRouteContext) GetRouteType() string
- type InfraIRMap
- type ListenerContext
- func (l *ListenerContext) AllowsKind(kind v1beta1.RouteGroupKind) bool
- func (l *ListenerContext) AllowsNamespace(namespace *v1.Namespace) bool
- func (l *ListenerContext) AttachedRoutes() int32
- func (l *ListenerContext) GetConditions() []metav1.Condition
- func (l *ListenerContext) IncrementAttachedRoutes()
- func (l *ListenerContext) IsReady() bool
- func (l *ListenerContext) SetCondition(conditionType v1beta1.ListenerConditionType, status metav1.ConditionStatus, ...)
- func (l *ListenerContext) SetSupportedKinds(kinds ...v1beta1.RouteGroupKind)
- func (l *ListenerContext) SetTLSSecret(tlsSecret *v1.Secret)
- type ListenersTranslator
- type Resources
- type RouteContext
- type RouteParentContext
- func (r *RouteParentContext) IsAccepted(route RouteContext) bool
- func (r *RouteParentContext) ResetConditions(route RouteContext)
- func (r *RouteParentContext) SetCondition(route RouteContext, conditionType v1beta1.RouteConditionType, ...)
- func (r *RouteParentContext) SetListeners(listeners ...*ListenerContext)
- type RoutesTranslator
- type TCPRouteContext
- func (t *TCPRouteContext) GetHostnames() []string
- func (t *TCPRouteContext) GetParentReferences() []v1beta1.ParentReference
- func (t *TCPRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
- func (t *TCPRouteContext) GetRouteStatus() *v1beta1.RouteStatus
- func (t *TCPRouteContext) GetRouteType() string
- type TLSRouteContext
- func (t *TLSRouteContext) GetHostnames() []string
- func (t *TLSRouteContext) GetParentReferences() []v1beta1.ParentReference
- func (t *TLSRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
- func (t *TLSRouteContext) GetRouteStatus() *v1beta1.RouteStatus
- func (t *TLSRouteContext) GetRouteType() string
- type TranslateResult
- type Translator
- func (t *Translator) GetRelevantGateways(gateways []*v1beta1.Gateway) []*GatewayContext
- func (t *Translator) ProcessGRPCFilters(parentRef *RouteParentContext, route RouteContext, ...) *HTTPFiltersContext
- func (t *Translator) ProcessGRPCRoutes(grpcRoutes []*v1alpha2.GRPCRoute, gateways []*GatewayContext, ...) []*GRPCRouteContext
- func (t *Translator) ProcessHTTPFilters(parentRef *RouteParentContext, route RouteContext, ...) *HTTPFiltersContext
- func (t *Translator) ProcessHTTPRoutes(httpRoutes []*v1beta1.HTTPRoute, gateways []*GatewayContext, ...) []*HTTPRouteContext
- func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap, infraIR InfraIRMap, ...)
- func (t *Translator) ProcessTCPRoutes(tcpRoutes []*v1alpha2.TCPRoute, gateways []*GatewayContext, ...) []*TCPRouteContext
- func (t *Translator) ProcessTLSRoutes(tlsRoutes []*v1alpha2.TLSRoute, gateways []*GatewayContext, ...) []*TLSRouteContext
- func (t *Translator) ProcessUDPRoutes(udpRoutes []*v1alpha2.UDPRoute, gateways []*GatewayContext, ...) []*UDPRouteContext
- func (t *Translator) Translate(resources *Resources) *TranslateResult
- type TranslatorManager
- type UDPRouteContext
- func (u *UDPRouteContext) GetHostnames() []string
- func (u *UDPRouteContext) GetParentReferences() []v1beta1.ParentReference
- func (u *UDPRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
- func (u *UDPRouteContext) GetRouteStatus() *v1beta1.RouteStatus
- func (u *UDPRouteContext) GetRouteType() string
- type XdsIRMap
- type XdsIRRoutes
Constants ¶
const ( TCPProtocol = "TCP" UDPProtocol = "UDP" L4Protocol = "L4" L7Protocol = "L7" )
const ( KindGateway = "Gateway" KindHTTPRoute = "HTTPRoute" KindGRPCRoute = "GRPCRoute" KindTLSRoute = "TLSRoute" KindTCPRoute = "TCPRoute" KindUDPRoute = "UDPRoute" KindService = "Service" KindSecret = "Secret" // OwningGatewayNamespaceLabel is the owner reference label used for managed infra. // The value should be the namespace of the accepted Envoy Gateway. OwningGatewayNamespaceLabel = "gateway.envoyproxy.io/owning-gateway-namespace" // OwningGatewayNameLabel is the owner reference label used for managed infra. // The value should be the name of the accepted Envoy Gateway. OwningGatewayNameLabel = "gateway.envoyproxy.io/owning-gateway-name" )
Variables ¶
This section is empty.
Functions ¶
func DowngradeBackendRef ¶ added in v0.3.0
func DowngradeBackendRef(old v1beta1.BackendRef) v1alpha2.BackendRef
func DowngradeParentReference ¶
func DowngradeParentReference(old v1beta1.ParentReference) v1alpha2.ParentReference
func DowngradeRouteParentStatuses ¶
func DowngradeRouteParentStatuses(routeParentStatuses []v1beta1.RouteParentStatus) []v1alpha2.RouteParentStatus
func FromNamespacesPtr ¶
func FromNamespacesPtr(fromNamespaces v1beta1.FromNamespaces) *v1beta1.FromNamespaces
func GatewayAddressTypePtr ¶
func GatewayAddressTypePtr(addr v1beta1.AddressType) *v1beta1.AddressType
func GatewayOwnerLabels ¶
GatewayOwnerLabels returns the Gateway Owner labels using the provided namespace and name as the values.
func GroupPtrV1Alpha2 ¶
func HasReadyListener ¶
func HasReadyListener(listeners []*ListenerContext) bool
HasReadyListener returns true if at least one Listener in the provided list has a condition of "Ready: true", and false otherwise.
func HeaderMatchTypeDerefOr ¶
func HeaderMatchTypeDerefOr(matchType *v1beta1.HeaderMatchType, defaultType v1beta1.HeaderMatchType) v1beta1.HeaderMatchType
func IsAuthnHTTPFilter ¶ added in v0.3.0
func IsAuthnHTTPFilter(filter *v1beta1.HTTPRouteFilter) bool
IsAuthnHTTPFilter returns true if the provided filter is an AuthenticationFilter.
func IsRateLimitHTTPFilter ¶ added in v0.3.0
func IsRateLimitHTTPFilter(filter *v1beta1.HTTPRouteFilter) bool
IsRateLimitHTTPFilter returns true if the provided filter is a RateLimitFilter.
func IsRefToGateway ¶
func IsRefToGateway(parentRef 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 KindPtrV1Alpha2 ¶
func NamespaceDerefOr ¶
func NamespaceDerefOrAlpha ¶
func NamespacePtr ¶
func NamespacePtrV1Alpha2 ¶
func ObjectNamePtr ¶
func ObjectNamePtr(val string) *v1alpha2.ObjectName
func PathMatchTypeDerefOr ¶
func PathMatchTypeDerefOr(matchType *v1beta1.PathMatchType, defaultType v1beta1.PathMatchType) v1beta1.PathMatchType
func PathMatchTypePtr ¶
func PathMatchTypePtr(pType v1beta1.PathMatchType) *v1beta1.PathMatchType
func PortNumPtr ¶
func PortNumPtr(val int32) *v1beta1.PortNumber
func PortNumPtrV1Alpha2 ¶
func PortNumPtrV1Alpha2(port int) *v1alpha2.PortNumber
func QueryParamMatchTypeDerefOr ¶ added in v0.3.0
func QueryParamMatchTypeDerefOr(matchType *v1beta1.QueryParamMatchType, defaultType v1beta1.QueryParamMatchType) v1beta1.QueryParamMatchType
func SectionNamePtr ¶
func SectionNamePtr(name string) *v1beta1.SectionName
func SectionNamePtrV1Alpha2 ¶
func SectionNamePtrV1Alpha2(sectionName string) *v1alpha2.SectionName
func TLSModeTypePtr ¶
func TLSModeTypePtr(mode v1beta1.TLSModeType) *v1beta1.TLSModeType
func UpgradeBackendRef ¶ added in v0.3.0
func UpgradeBackendRef(old v1alpha2.BackendRef) v1beta1.BackendRef
UpgradeBackendRef converts v1alpha2.BackendRef to v1beta1.BackendRef
func UpgradeParentReference ¶
func UpgradeParentReference(old v1alpha2.ParentReference) v1beta1.ParentReference
UpgradeParentReference converts v1alpha2.ParentReference to v1beta1.ParentReference
func UpgradeParentReferences ¶
func UpgradeParentReferences(old []v1alpha2.ParentReference) []v1beta1.ParentReference
func UpgradeRouteParentStatuses ¶
func UpgradeRouteParentStatuses(routeParentStatuses []v1alpha2.RouteParentStatus) []v1beta1.RouteParentStatus
func ValidateGRPCRouteFilter ¶ added in v0.3.0
func ValidateGRPCRouteFilter(filter *v1alpha2.GRPCRouteFilter) error
ValidateGRPCRouteFilter validates the provided filter within GRPCRoute.
func ValidateHTTPRouteFilter ¶ added in v0.3.0
func ValidateHTTPRouteFilter(filter *v1beta1.HTTPRouteFilter) error
ValidateHTTPRouteFilter validates the provided filter within HTTPRoute.
Types ¶
type FiltersTranslator ¶ added in v0.3.0
type FiltersTranslator interface { HTTPFiltersTranslator }
type GRPCRouteContext ¶ added in v0.3.0
GRPCRouteContext wraps a GRPCRoute and provides helper methods for accessing the route's parents.
func (*GRPCRouteContext) GetHostnames ¶ added in v0.3.0
func (g *GRPCRouteContext) GetHostnames() []string
func (*GRPCRouteContext) GetParentReferences ¶ added in v0.3.0
func (g *GRPCRouteContext) GetParentReferences() []v1beta1.ParentReference
func (*GRPCRouteContext) GetRouteParentContext ¶ added in v0.3.0
func (g *GRPCRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
func (*GRPCRouteContext) GetRouteStatus ¶ added in v0.3.0
func (g *GRPCRouteContext) GetRouteStatus() *v1beta1.RouteStatus
func (*GRPCRouteContext) GetRouteType ¶ added in v0.3.0
func (g *GRPCRouteContext) GetRouteType() string
type GatewayContext ¶
GatewayContext wraps a Gateway and provides helper methods for setting conditions, accessing Listeners, etc.
func (*GatewayContext) ResetListeners ¶ added in v0.3.0
func (g *GatewayContext) ResetListeners()
ResetListeners resets the listener statuses and re-generates the GatewayContext ListenerContexts from the Gateway spec.
type HTTPFilterIR ¶ added in v0.3.0
type HTTPFilterIR struct { DirectResponse *ir.DirectResponse RedirectResponse *ir.Redirect URLRewrite *ir.URLRewrite AddRequestHeaders []ir.AddHeader RemoveRequestHeaders []string AddResponseHeaders []ir.AddHeader RemoveResponseHeaders []string Mirrors []*ir.RouteDestination RequestAuthentication *ir.RequestAuthentication RateLimit *ir.RateLimit }
HTTPFilterIR contains the ir processing results.
type HTTPFiltersContext ¶ added in v0.3.0
type HTTPFiltersContext struct { *HTTPFilterIR ParentRef *RouteParentContext Route RouteContext }
HTTPFiltersContext is the context of http filters processing.
type HTTPFiltersTranslator ¶ added in v0.3.0
type HTTPFiltersTranslator interface {
// contains filtered or unexported methods
}
type HTTPRouteContext ¶
HTTPRouteContext wraps an HTTPRoute and provides helper methods for accessing the route's parents.
func (*HTTPRouteContext) GetHostnames ¶
func (h *HTTPRouteContext) GetHostnames() []string
func (*HTTPRouteContext) GetParentReferences ¶
func (h *HTTPRouteContext) GetParentReferences() []v1beta1.ParentReference
func (*HTTPRouteContext) GetRouteParentContext ¶
func (h *HTTPRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
func (*HTTPRouteContext) GetRouteStatus ¶ added in v0.3.0
func (h *HTTPRouteContext) GetRouteStatus() *v1beta1.RouteStatus
func (*HTTPRouteContext) GetRouteType ¶
func (h *HTTPRouteContext) GetRouteType() string
type InfraIRMap ¶
type ListenerContext ¶
ListenerContext wraps a Listener and provides helper methods for setting conditions and other status information on the associated Gateway, etc.
func GetReferencedListeners ¶
func GetReferencedListeners(parentRef v1beta1.ParentReference, gateways []*GatewayContext) (bool, []*ListenerContext)
GetReferencedListeners returns whether a given parent ref references a Gateway in the given list, and if so, a list of the Listeners within that Gateway that are included by the parent ref (either one specific Listener, or all Listeners in the Gateway, depending on whether section name is specified or not).
func (*ListenerContext) AllowsKind ¶
func (l *ListenerContext) AllowsKind(kind v1beta1.RouteGroupKind) bool
func (*ListenerContext) AllowsNamespace ¶
func (l *ListenerContext) AllowsNamespace(namespace *v1.Namespace) bool
func (*ListenerContext) AttachedRoutes ¶ added in v0.3.0
func (l *ListenerContext) AttachedRoutes() int32
func (*ListenerContext) GetConditions ¶
func (l *ListenerContext) GetConditions() []metav1.Condition
func (*ListenerContext) IncrementAttachedRoutes ¶
func (l *ListenerContext) IncrementAttachedRoutes()
func (*ListenerContext) IsReady ¶
func (l *ListenerContext) IsReady() bool
func (*ListenerContext) SetCondition ¶
func (l *ListenerContext) SetCondition(conditionType v1beta1.ListenerConditionType, status metav1.ConditionStatus, reason v1beta1.ListenerConditionReason, message string)
func (*ListenerContext) SetSupportedKinds ¶
func (l *ListenerContext) SetSupportedKinds(kinds ...v1beta1.RouteGroupKind)
func (*ListenerContext) SetTLSSecret ¶
func (l *ListenerContext) SetTLSSecret(tlsSecret *v1.Secret)
type ListenersTranslator ¶ added in v0.3.0
type ListenersTranslator interface {
ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap, infraIR InfraIRMap, resources *Resources)
}
type Resources ¶
type Resources struct { Gateways []*v1beta1.Gateway HTTPRoutes []*v1beta1.HTTPRoute GRPCRoutes []*v1alpha2.GRPCRoute TLSRoutes []*v1alpha2.TLSRoute TCPRoutes []*v1alpha2.TCPRoute UDPRoutes []*v1alpha2.UDPRoute ReferenceGrants []*v1alpha2.ReferenceGrant Namespaces []*v1.Namespace Services []*v1.Service Secrets []*v1.Secret AuthenticationFilters []*egv1a1.AuthenticationFilter RateLimitFilters []*egv1a1.RateLimitFilter EnvoyProxy *egcfgv1a1.EnvoyProxy }
Resources holds the Gateway API and related resources that the translators needs as inputs. +k8s:deepcopy-gen=true
func NewResources ¶ added in v0.3.0
func NewResources() *Resources
func (*Resources) DeepCopy ¶ added in v0.3.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Resources.
func (*Resources) DeepCopyInto ¶ added in v0.3.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RouteContext ¶
type RouteContext interface { client.Object // GetRouteType returns the Kind of the Route object, HTTPRoute, // TLSRoute, TCPRoute, UDPRoute etc. GetRouteType() string // GetRouteStatus returns the RouteStatus object associated with the Route. GetRouteStatus() *v1beta1.RouteStatus // TODO: [v1alpha2-v1beta1] This should not be required once all Route // objects being implemented are of type v1beta1. // GetParentReferences returns the ParentReference of the Route object. GetParentReferences() []v1beta1.ParentReference // GetRouteParentContext returns RouteParentContext by using the Route // objects' ParentReference. GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext // TODO: [v1alpha2-v1beta1] This should not be required once all Route // objects being implemented are of type v1beta1. // GetHostnames returns the hosts targeted by the Route object. GetHostnames() []string }
RouteContext represents a generic Route object (HTTPRoute, TLSRoute, etc.) that can reference Gateway objects.
type RouteParentContext ¶
type RouteParentContext struct { *v1beta1.ParentReference // contains filtered or unexported fields }
RouteParentContext wraps a ParentReference and provides helper methods for setting conditions and other status information on the associated HTTPRoute, TLSRoute etc.
func (*RouteParentContext) IsAccepted ¶
func (r *RouteParentContext) IsAccepted(route RouteContext) bool
func (*RouteParentContext) ResetConditions ¶
func (r *RouteParentContext) ResetConditions(route RouteContext)
func (*RouteParentContext) SetCondition ¶
func (r *RouteParentContext) SetCondition(route RouteContext, conditionType v1beta1.RouteConditionType, status metav1.ConditionStatus, reason v1beta1.RouteConditionReason, message string)
func (*RouteParentContext) SetListeners ¶
func (r *RouteParentContext) SetListeners(listeners ...*ListenerContext)
type RoutesTranslator ¶ added in v0.3.0
type RoutesTranslator interface { ProcessHTTPRoutes(httpRoutes []*v1beta1.HTTPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*HTTPRouteContext ProcessGRPCRoutes(grpcRoutes []*v1alpha2.GRPCRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*GRPCRouteContext ProcessTLSRoutes(tlsRoutes []*v1alpha2.TLSRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TLSRouteContext ProcessTCPRoutes(tcpRoutes []*v1alpha2.TCPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TCPRouteContext ProcessUDPRoutes(udpRoutes []*v1alpha2.UDPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*UDPRouteContext }
type TCPRouteContext ¶ added in v0.3.0
TCPRouteContext wraps a TCPRoute and provides helper methods for accessing the route's parents.
func (*TCPRouteContext) GetHostnames ¶ added in v0.3.0
func (t *TCPRouteContext) GetHostnames() []string
func (*TCPRouteContext) GetParentReferences ¶ added in v0.3.0
func (t *TCPRouteContext) GetParentReferences() []v1beta1.ParentReference
func (*TCPRouteContext) GetRouteParentContext ¶ added in v0.3.0
func (t *TCPRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
func (*TCPRouteContext) GetRouteStatus ¶ added in v0.3.0
func (t *TCPRouteContext) GetRouteStatus() *v1beta1.RouteStatus
func (*TCPRouteContext) GetRouteType ¶ added in v0.3.0
func (t *TCPRouteContext) GetRouteType() string
type TLSRouteContext ¶
TLSRouteContext wraps a TLSRoute and provides helper methods for accessing the route's parents.
func (*TLSRouteContext) GetHostnames ¶
func (t *TLSRouteContext) GetHostnames() []string
func (*TLSRouteContext) GetParentReferences ¶
func (t *TLSRouteContext) GetParentReferences() []v1beta1.ParentReference
func (*TLSRouteContext) GetRouteParentContext ¶
func (t *TLSRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
func (*TLSRouteContext) GetRouteStatus ¶ added in v0.3.0
func (t *TLSRouteContext) GetRouteStatus() *v1beta1.RouteStatus
func (*TLSRouteContext) GetRouteType ¶
func (t *TLSRouteContext) GetRouteType() string
type TranslateResult ¶
type Translator ¶
type Translator struct { // GatewayClassName is the name of the GatewayClass // to process Gateways for. GatewayClassName v1beta1.ObjectName // ProxyImage is the optional proxy image to use in // the Infra IR. If unspecified, the default proxy // image will be used. ProxyImage string // GlobalRateLimitEnabled is true when global // ratelimiting has been configured by the admin. GlobalRateLimitEnabled bool }
Translator translates Gateway API resources to IRs and computes status for Gateway API resources.
func (*Translator) GetRelevantGateways ¶
func (t *Translator) GetRelevantGateways(gateways []*v1beta1.Gateway) []*GatewayContext
GetRelevantGateways returns GatewayContexts, containing a copy of the original Gateway with the Listener statuses reset.
func (*Translator) ProcessGRPCFilters ¶ added in v0.3.0
func (t *Translator) ProcessGRPCFilters(parentRef *RouteParentContext, route RouteContext, filters []v1alpha2.GRPCRouteFilter, resources *Resources) *HTTPFiltersContext
ProcessGRPCFilters translates gateway api grpc filters to IRs.
func (*Translator) ProcessGRPCRoutes ¶ added in v0.3.0
func (t *Translator) ProcessGRPCRoutes(grpcRoutes []*v1alpha2.GRPCRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*GRPCRouteContext
func (*Translator) ProcessHTTPFilters ¶ added in v0.3.0
func (t *Translator) ProcessHTTPFilters(parentRef *RouteParentContext, route RouteContext, filters []v1beta1.HTTPRouteFilter, resources *Resources) *HTTPFiltersContext
ProcessHTTPFilters translates gateway api http filters to IRs.
func (*Translator) ProcessHTTPRoutes ¶
func (t *Translator) ProcessHTTPRoutes(httpRoutes []*v1beta1.HTTPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*HTTPRouteContext
func (*Translator) ProcessListeners ¶
func (t *Translator) ProcessListeners(gateways []*GatewayContext, xdsIR XdsIRMap, infraIR InfraIRMap, resources *Resources)
func (*Translator) ProcessTCPRoutes ¶ added in v0.3.0
func (t *Translator) ProcessTCPRoutes(tcpRoutes []*v1alpha2.TCPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TCPRouteContext
func (*Translator) ProcessTLSRoutes ¶
func (t *Translator) ProcessTLSRoutes(tlsRoutes []*v1alpha2.TLSRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*TLSRouteContext
func (*Translator) ProcessUDPRoutes ¶ added in v0.3.0
func (t *Translator) ProcessUDPRoutes(udpRoutes []*v1alpha2.UDPRoute, gateways []*GatewayContext, resources *Resources, xdsIR XdsIRMap) []*UDPRouteContext
func (*Translator) Translate ¶
func (t *Translator) Translate(resources *Resources) *TranslateResult
type TranslatorManager ¶ added in v0.3.0
type TranslatorManager interface { Translate(resources *Resources) *TranslateResult GetRelevantGateways(gateways []*v1beta1.Gateway) []*GatewayContext RoutesTranslator ListenersTranslator FiltersTranslator }
type UDPRouteContext ¶ added in v0.3.0
UDPRouteContext wraps a UDPRoute and provides helper methods for accessing the route's parents.
func (*UDPRouteContext) GetHostnames ¶ added in v0.3.0
func (u *UDPRouteContext) GetHostnames() []string
func (*UDPRouteContext) GetParentReferences ¶ added in v0.3.0
func (u *UDPRouteContext) GetParentReferences() []v1beta1.ParentReference
func (*UDPRouteContext) GetRouteParentContext ¶ added in v0.3.0
func (u *UDPRouteContext) GetRouteParentContext(forParentRef v1beta1.ParentReference) *RouteParentContext
func (*UDPRouteContext) GetRouteStatus ¶ added in v0.3.0
func (u *UDPRouteContext) GetRouteStatus() *v1beta1.RouteStatus
func (*UDPRouteContext) GetRouteType ¶ added in v0.3.0
func (u *UDPRouteContext) GetRouteType() string
type XdsIRRoutes ¶
func (XdsIRRoutes) Len ¶
func (x XdsIRRoutes) Len() int
func (XdsIRRoutes) Less ¶
func (x XdsIRRoutes) Less(i, j int) bool
func (XdsIRRoutes) Swap ¶
func (x XdsIRRoutes) Swap(i, j int)