pub struct ConsulCheck {Show 19 fields
pub check_type: CheckType,
pub name: String,
pub command: String,
pub args: Vec<String>,
pub path: Option<String>,
pub protocol: Option<Protocol>,
pub expose: bool,
pub address_mode: AddressMode,
pub port_label: String,
pub interval: Duration,
pub timeout: Duration,
pub initial_status: Option<String>,
pub tls_skip_verify: bool,
pub method: HttpMethod,
pub header: Option<HashMap<String, Vec<String>>>,
pub grpc_service: String,
pub grpc_use_tls: bool,
pub task_name: String,
pub check_restart: CheckRestart,
}Expand description
Checks define health checks associated with the service. Nomad supports the script, http and tcp Consul Checks.
Fields§
§check_type: CheckTypeThis indicates the check types supported by Nomad.
name: StringThe name of the health check.
command: StringThe command to execute.
args: Vec<String>The arguments to provide the command.
path: Option<String>The path or route to use.
protocol: Option<Protocol>The protocol to use. See also Protocol
expose: boolWhether to expose the check.
address_mode: AddressModeThe address mode to use. See also AddressMode
port_label: StringThe port label to use.
interval: DurationThis indicates the frequency of the health checks that Consul will perform.
timeout: DurationThis indicates how long Consul will wait for a health check query to succeed.
initial_status: Option<String>The initial status of the check.
tls_skip_verify: boolIf true, Consul will not attempt to verify the certificate when performing HTTPS checks. Requires Consul >= 0.7.2.
method: HttpMethodThe HTTP method to use for HTTP checks.
Defaults to HttpMethod::GET.
header: Option<HashMap<String, Vec<String>>>Headers for HTTP checks. Headers will be written once for each value.
grpc_service: StringThe grpc healthcheck.
grpc_use_tls: boolWhether the grpc healthcheck uses TLS.
task_name: StringThe name of the task for the check.
check_restart: CheckRestartCheckRestart is an object which enables restarting of tasks based upon Consul health checks.
Trait Implementations§
Source§impl Clone for ConsulCheck
impl Clone for ConsulCheck
Source§fn clone(&self) -> ConsulCheck
fn clone(&self) -> ConsulCheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConsulCheck
impl Debug for ConsulCheck
Source§impl Default for ConsulCheck
impl Default for ConsulCheck
Source§fn default() -> Self
fn default() -> Self
Return ConsulCheck { check_type: Default::default(), name: Default::default(), command: Default::default(), args: Default::default(), path: Default::default(), protocol: Default::default(), expose: Default::default(), address_mode: Default::default(), port_label: Default::default(), interval: Default::default(), timeout: Default::default(), initial_status: Default::default(), tls_skip_verify: Default::default(), method: HttpMethod::Get, header: Default::default(), grpc_service: Default::default(), grpc_use_tls: Default::default(), task_name: Default::default(), check_restart: Default::default() }
Source§impl<'de> Deserialize<'de> for ConsulCheck
impl<'de> Deserialize<'de> for ConsulCheck
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>,
Source§impl PartialEq for ConsulCheck
impl PartialEq for ConsulCheck
Source§impl Serialize for ConsulCheck
impl Serialize for ConsulCheck
impl Eq for ConsulCheck
impl StructuralPartialEq for ConsulCheck
Auto Trait Implementations§
impl Freeze for ConsulCheck
impl RefUnwindSafe for ConsulCheck
impl Send for ConsulCheck
impl Sync for ConsulCheck
impl Unpin for ConsulCheck
impl UnwindSafe for ConsulCheck
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.