Struct digitalocean::api::LoadBalancer
source · pub struct LoadBalancer { /* private fields */ }
Expand description
Load Balancers provide a way to distribute traffic across multiple Droplets.
Implementations§
source§impl LoadBalancer
impl LoadBalancer
sourcepub fn id(&self) -> &String
pub fn id(&self) -> &String
A unique ID that can be used to identify and reference a Load Balancer.
sourcepub fn ip(&self) -> &IpAddr
pub fn ip(&self) -> &IpAddr
An attribute containing the public-facing IP address of the Load Balancer.
sourcepub fn algorithm(&self) -> &String
pub fn algorithm(&self) -> &String
The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either “round_robin” or “least_connections”.
sourcepub fn status(&self) -> &String
pub fn status(&self) -> &String
A status string indicating the current state of the Load Balancer. This can be “new”, “active”, or “errored”.
sourcepub fn created_at(&self) -> &DateTime<Utc>
pub fn created_at(&self) -> &DateTime<Utc>
A time value given in ISO8601 combined date and time format that represents when the Load Balancer was created.
sourcepub fn forwarding_rules(&self) -> &Vec<ForwardingRule>
pub fn forwarding_rules(&self) -> &Vec<ForwardingRule>
An object specifying the forwarding rules for a Load Balancer.
sourcepub fn health_check(&self) -> &HealthCheck
pub fn health_check(&self) -> &HealthCheck
An object specifying health check settings for the Load Balancer.
sourcepub fn sticky_sessions(&self) -> &StickySessions
pub fn sticky_sessions(&self) -> &StickySessions
An object specifying sticky sessions settings for the Load Balancer.
sourcepub fn tag(&self) -> &String
pub fn tag(&self) -> &String
The name of a Droplet tag corresponding to Droplets assigned to the Load Balancer.
sourcepub fn droplet_ids(&self) -> &Vec<usize>
pub fn droplet_ids(&self) -> &Vec<usize>
An array containing the IDs of the Droplets assigned to the Load Balancer.
sourcepub fn redirect_http_to_https(&self) -> &bool
pub fn redirect_http_to_https(&self) -> &bool
A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443.
source§impl LoadBalancer
impl LoadBalancer
sourcepub fn create<S>(name: S, region: S) -> LoadBalancerRequest<Create, LoadBalancer>where
S: AsRef<str> + Serialize + Display,
pub fn create<S>(name: S, region: S) -> LoadBalancerRequest<Create, LoadBalancer>where
S: AsRef<str> + Serialize + Display,
Be sure to include a forwarding rule by chaining .forwarding_rule()
onto this.
Note: It may contain one of the droplets_ids or tag attributes as they are mutually exclusive.
sourcepub fn get<S>(id: S) -> LoadBalancerRequest<Get, LoadBalancer>where
S: AsRef<str> + Serialize + Display,
pub fn get<S>(id: S) -> LoadBalancerRequest<Get, LoadBalancer>where
S: AsRef<str> + Serialize + Display,
sourcepub fn list() -> LoadBalancerRequest<List, Vec<LoadBalancer>>
pub fn list() -> LoadBalancerRequest<List, Vec<LoadBalancer>>
sourcepub fn update<S>(id: S) -> LoadBalancerRequest<Update, LoadBalancer>where
S: AsRef<str> + Serialize + Display,
pub fn update<S>(id: S) -> LoadBalancerRequest<Update, LoadBalancer>where
S: AsRef<str> + Serialize + Display,
Note: Any attribute that is not provided will be reset to its default value.
Note: It may contain one of the droplets_ids or tag attributes as they are mutually exclusive.
Trait Implementations§
source§impl Clone for LoadBalancer
impl Clone for LoadBalancer
source§fn clone(&self) -> LoadBalancer
fn clone(&self) -> LoadBalancer
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more