pub struct IngressRule {
pub host: String,
pub path: String,
pub service_name: String,
pub service_port: u16,
pub namespace: String,
}Expand description
A single routing rule parsed from a Kubernetes Ingress resource.
Fields§
§host: StringValue of spec.rules[].host. Empty string means match-all.
path: StringValue of spec.rules[].http.paths[].path. Prefix match.
service_name: StringKubernetes service name (spec.rules[].http.paths[].backend.service.name).
service_port: u16Kubernetes service port number.
namespace: StringNamespace the Ingress lives in.
Implementations§
Source§impl IngressRule
impl IngressRule
Sourcepub fn upstream_addr(&self) -> String
pub fn upstream_addr(&self) -> String
Build the upstream Kubernetes DNS address.
Returns "{service_name}.{namespace}.svc.cluster.local:{service_port}".
Trait Implementations§
Source§impl Clone for IngressRule
impl Clone for IngressRule
Source§fn clone(&self) -> IngressRule
fn clone(&self) -> IngressRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IngressRule
impl Debug for IngressRule
Source§impl PartialEq for IngressRule
impl PartialEq for IngressRule
Source§fn eq(&self, other: &IngressRule) -> bool
fn eq(&self, other: &IngressRule) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for IngressRule
Auto Trait Implementations§
impl Freeze for IngressRule
impl RefUnwindSafe for IngressRule
impl Send for IngressRule
impl Sync for IngressRule
impl Unpin for IngressRule
impl UnsafeUnpin for IngressRule
impl UnwindSafe for IngressRule
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