Struct gateway_api::standard::gateways::GatewayListeners
source · pub struct GatewayListeners {
pub allowed_routes: Option<GatewayListenersAllowedRoutes>,
pub hostname: Option<String>,
pub name: String,
pub port: i32,
pub protocol: String,
pub tls: Option<GatewayListenersTls>,
}
Expand description
Listener embodies the concept of a logical endpoint where a Gateway accepts network connections.
Fields
allowed_routes: Option<GatewayListenersAllowedRoutes>
AllowedRoutes defines the types of routes that MAY be attached to a Listener and the trusted namespaces where those Route resources MAY be present. Although a client request may match multiple route rules, only one rule may ultimately receive the request. Matching precedence MUST be determined in order of the following criteria:
- The most specific match as defined by the Route type. * The oldest Route based on creation timestamp. For example, a Route with a creation timestamp of “2020-09-08 01:02:03” is given precedence over a Route with a creation timestamp of “2020-09-08 01:02:04”. * If everything else is equivalent, the Route appearing first in alphabetical order (namespace/name) should be given precedence. For example, foo/bar is given precedence over foo/baz. All valid rules within a Route attached to this Listener should be implemented. Invalid Route rules can be ignored (sometimes that will mean the full Route). If a Route rule transitions from valid to invalid, support for that Route rule should be dropped to ensure consistency. For example, even if a filter specified by a Route rule is invalid, the rest of the rules within that Route should still be supported. Support: Core
hostname: Option<String>
Hostname specifies the virtual hostname to match for protocol types that define this concept. When unspecified, all hostnames are matched. This field is ignored for protocols that don’t require hostname based matching. Implementations MUST apply Hostname matching appropriately for each of the following protocols:
- TLS: The Listener Hostname MUST match the SNI. * HTTP: The Listener Hostname MUST match the Host header of the request. * HTTPS: The Listener Hostname SHOULD match at both the TLS and HTTP protocol layers as described above. If an implementation does not ensure that both the SNI and Host header match the Listener hostname, it MUST clearly document that.
For HTTPRoute and TLSRoute resources, there is an interaction with the
spec.hostnames
array. When both listener and route specify hostnames, there MUST be an intersection between the values for a Route to be accepted. For more information, refer to the Route specific Hostnames documentation. Hostnames that are prefixed with a wildcard label (*.
) are interpreted as a suffix match. That means that a match for*.example.com
would match bothtest.example.com
, andfoo.test.example.com
, but notexample.com
. Support: Core
name: String
Name is the name of the Listener. This name MUST be unique within a Gateway. Support: Core
port: i32
Port is the network port. Multiple listeners may use the same port, subject to the Listener compatibility rules. Support: Core
protocol: String
Protocol specifies the network protocol this listener expects to receive. Support: Core
tls: Option<GatewayListenersTls>
TLS is the TLS configuration for the Listener. This field is required if the Protocol field is “HTTPS” or “TLS”. It is invalid to set this field if the Protocol field is “HTTP”, “TCP”, or “UDP”. The association of SNIs to Certificate defined in GatewayTLSConfig is defined based on the Hostname field for this listener. The GatewayClass MUST use the longest matching SNI out of all available certificates for any TLS handshake. Support: Core
Trait Implementations
sourceimpl Clone for GatewayListeners
impl Clone for GatewayListeners
sourcefn clone(&self) -> GatewayListeners
fn clone(&self) -> GatewayListeners
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for GatewayListeners
impl Debug for GatewayListeners
sourceimpl<'de> Deserialize<'de> for GatewayListeners
impl<'de> Deserialize<'de> for GatewayListeners
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl JsonSchema for GatewayListeners
impl JsonSchema for GatewayListeners
sourcefn schema_name() -> String
fn schema_name() -> String
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more