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>
pub fn create<S>( name: S, region: S, ) -> LoadBalancerRequest<Create, LoadBalancer>
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>
pub fn get<S>(id: S) -> LoadBalancerRequest<Get, LoadBalancer>
Sourcepub fn list() -> LoadBalancerRequest<List, Vec<LoadBalancer>>
pub fn list() -> LoadBalancerRequest<List, Vec<LoadBalancer>>
Sourcepub fn update<S>(id: S) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn update<S>(id: S) -> LoadBalancerRequest<Update, LoadBalancer>
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.
Sourcepub fn delete<S>(id: S) -> LoadBalancerRequest<Delete, ()>
pub fn delete<S>(id: S) -> LoadBalancerRequest<Delete, ()>
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