Struct haproxy_api::Server[][src]

pub struct Server<'lua> {
    pub name: String,
    pub puid: String,
    // some fields omitted
}
Expand description

The “Server” class provides a way for manipulating servers and retrieving information.

Fields

name: Stringpuid: String

Implementations

impl<'lua> Server<'lua>[src]

pub fn is_draining(&self) -> Result<bool>[src]

Returns true if the server is currently draining sticky connections.

pub fn set_maxconn(&self, maxconn: u64) -> Result<()>[src]

Dynamically changes the maximum connections of the server.

pub fn get_maxconn(&self) -> Result<u64>[src]

Returns an integer representing the server maximum connections.

pub fn set_weight(&self, weight: &str) -> Result<()>[src]

Dynamically changes the weight of the server. See the management socket documentation for more information about the format of the string.

pub fn get_weight(&self) -> Result<u32>[src]

Returns an integer representing the server weight.

pub fn set_addr(&self, addr: String, port: Option<u16>) -> Result<()>[src]

Dynamically changes the address of the server.

pub fn get_addr(&self) -> Result<String>[src]

Returns a string describing the address of the server.

pub fn get_stats(&self) -> Result<Table<'lua>>[src]

Returns a table containing the server statistics.

pub fn shut_sess(&self) -> Result<()>[src]

Shutdowns all the sessions attached to the server.

pub fn set_drain(&self) -> Result<()>[src]

Drains sticky sessions.

pub fn set_maint(&self) -> Result<()>[src]

Sets maintenance mode.

pub fn set_ready(&self) -> Result<()>[src]

Sets normal mode.

pub fn check_enable(&self) -> Result<()>[src]

Enables health checks.

pub fn check_disable(&self) -> Result<()>[src]

Disables health checks.

pub fn check_force_up(&self) -> Result<()>[src]

Forces health-check up.

pub fn check_force_nolb(&self) -> Result<()>[src]

Forces health-check nolb mode.

pub fn check_force_down(&self) -> Result<()>[src]

Forces health-check down.

pub fn agent_enable(&self) -> Result<()>[src]

Enables agent check.

pub fn agent_disable(&self) -> Result<()>[src]

Disables agent check.

pub fn agent_force_up(&self) -> Result<()>[src]

Forces agent check up.

pub fn agent_force_down(&self) -> Result<()>[src]

Forces agent check down.

Trait Implementations

impl<'lua> Clone for Server<'lua>[src]

fn clone(&self) -> Server<'lua>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<'lua> FromLua<'lua> for Server<'lua>[src]

fn from_lua(value: Value<'lua>, lua: &'lua Lua) -> Result<Self>[src]

Performs the conversion.

Auto Trait Implementations

impl<'lua> !RefUnwindSafe for Server<'lua>

impl<'lua> !Send for Server<'lua>

impl<'lua> !Sync for Server<'lua>

impl<'lua> Unpin for Server<'lua>

impl<'lua> !UnwindSafe for Server<'lua>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<'lua, T> FromLuaMulti<'lua> for T where
    T: FromLua<'lua>, 
[src]

pub fn from_lua_multi(
    values: MultiValue<'lua>,
    lua: &'lua Lua
) -> Result<T, Error>
[src]

Performs the conversion. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.