pub enum Service {
Dns(DnsService),
Kube(KubeService),
}
Expand description
A uniquely identifiable service that traffic can be routed to.
Services are abstract, and can have different semantics depending on where and how they’re defined.
Variants§
Dns(DnsService)
A DNS hostname.
See DnsService for details.
Kube(KubeService)
A Kubernetes Service.
See KubeService for details.
Implementations§
Source§impl Service
impl Service
Sourcepub fn dns(name: &str) -> Result<Self, Error>
pub fn dns(name: &str) -> Result<Self, Error>
Create a new DNS target. The given name must be a valid RFC 1123 DNS hostname.
Sourcepub fn kube(namespace: &str, name: &str) -> Result<Self, Error>
pub fn kube(namespace: &str, name: &str) -> Result<Self, Error>
Create a new Kubernetes Service target.
name
and hostname
must be valid DNS subdomain labels.
Sourcepub fn as_backend_id(&self, port: u16) -> BackendId
pub fn as_backend_id(&self, port: u16) -> BackendId
Clone and convert this backend into a BackendId with the specified port.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Service
impl<'de> Deserialize<'de> for Service
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
Source§impl Ord for Service
impl Ord for Service
Source§impl PartialOrd for Service
impl PartialOrd for Service
impl Eq for Service
impl StructuralPartialEq for Service
Auto Trait Implementations§
impl Freeze for Service
impl RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl UnwindSafe for Service
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