Struct spacegate_model::http_route::SgHttpRoute
source · pub struct SgHttpRoute<P = PluginInstanceId> {
pub route_name: String,
pub hostnames: Option<Vec<String>>,
pub plugins: Vec<P>,
pub rules: Vec<SgHttpRouteRule<P>>,
pub priority: i16,
}Expand description
HTTPRoute provides a way to route HTTP requests.
Reference: Kubernetes Gateway
Fields§
§route_name: StringRoute name
hostnames: Option<Vec<String>>Hostnames defines a set of hostname that should match against the HTTP Host header to select a HTTPRoute to process the request.
plugins: Vec<P>Filters define the filters that are applied to requests that match this hostnames.
rules: Vec<SgHttpRouteRule<P>>Rules are a list of HTTP matchers, filters and actions.
priority: i16Rule priority, the rule of higher priority will be chosen.
Implementations§
source§impl<P> SgHttpRoute<P>
impl<P> SgHttpRoute<P>
pub fn map_plugins<F, T>(self, f: F) -> SgHttpRoute<T>where
F: FnMut(P) -> T,
Trait Implementations§
source§impl<P: Clone> Clone for SgHttpRoute<P>
impl<P: Clone> Clone for SgHttpRoute<P>
source§fn clone(&self) -> SgHttpRoute<P>
fn clone(&self) -> SgHttpRoute<P>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl<P: Debug> Debug for SgHttpRoute<P>
impl<P: Debug> Debug for SgHttpRoute<P>
source§impl<P> Default for SgHttpRoute<P>
impl<P> Default for SgHttpRoute<P>
source§impl<'de, P> Deserialize<'de> for SgHttpRoute<P>
impl<'de, P> Deserialize<'de> for SgHttpRoute<P>
source§fn 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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<P> Freeze for SgHttpRoute<P>
impl<P> RefUnwindSafe for SgHttpRoute<P>where
P: RefUnwindSafe,
impl<P> Send for SgHttpRoute<P>where
P: Send,
impl<P> Sync for SgHttpRoute<P>where
P: Sync,
impl<P> Unpin for SgHttpRoute<P>where
P: Unpin,
impl<P> UnwindSafe for SgHttpRoute<P>where
P: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more