pub struct HealthCheck {
    pub protocol: String,
    pub port: usize,
    pub path: String,
    pub check_interval_seconds: usize,
    pub response_timeout_seconds: usize,
    pub unhealthy_threshold: usize,
    pub healthy_threshold: usize,
}
Expand description

This exists in the health_check field of a droplet.

Health checks are used to tell if a Droplet is responding and should receive traffic. The Load Balancer will automatically stop sending traffic to unresponsive Droplets. You may specify the protocol, port, and path for a health check as well as additional setting such as the check interval and response timeout.

Fields§

§protocol: String

The protocol used for health checks sent to the backend Droplets. The possible values are “http” or “tcp”.

§port: usize

An integer representing the port on the backend Droplets on which the health check will attempt a connection.

§path: String

The path on the backend Droplets to which the Load Balancer instance will send a request.

§check_interval_seconds: usize

The number of seconds between between two consecutive health checks.

§response_timeout_seconds: usize

The number of seconds the Load Balancer instance will wait for a response until marking a health check as failed.

§unhealthy_threshold: usize

The number of times a health check must fail for a backend Droplet to be marked “unhealthy” and be removed from the pool.

§healthy_threshold: usize

The number of times a health check must pass for a backend Droplet to be marked “healthy” and be re-added to the pool.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.