pub struct Service {Show 19 fields
pub name: String,
pub tags: Vec<String>,
pub canary_tags: Option<Vec<String>>,
pub enable_tag_override: Option<bool>,
pub port_label: Option<String>,
pub address_mode: Option<String>,
pub address: String,
pub checks: Vec<ServiceCheck>,
pub check_restart: Option<CheckRestart>,
pub connect: Option<ConsulConnect>,
pub meta: HashMap<String, String>,
pub canary_meta: HashMap<String, String>,
pub tagged_addresses: HashMap<String, String>,
pub task_name: Option<String>,
pub on_update: Option<String>,
pub identity: Option<WorkloadIdentity>,
pub weights: Option<ServiceWeights>,
pub provider: String,
pub cluster: String,
}
Expand description
Service represents a Nomad job-submitters view of a Consul or Nomad service.
This struct was generated based on the Go types of the official Nomad API client.
Fields§
§name: String
§enable_tag_override: Option<bool>
§port_label: Option<String>
§address_mode: Option<String>
§address: String
§checks: Vec<ServiceCheck>
§check_restart: Option<CheckRestart>
§connect: Option<ConsulConnect>
§meta: HashMap<String, String>
§canary_meta: HashMap<String, String>
§tagged_addresses: HashMap<String, String>
§task_name: Option<String>
§on_update: Option<String>
§identity: Option<WorkloadIdentity>
§weights: Option<ServiceWeights>
§provider: String
Provider defines which backend system provides the service registration, either “consul” (default) or “nomad”.
cluster: String
Cluster is valid only for Nomad Enterprise with provider: consul
Implementations§
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
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