Struct haproxy_api::Server
source · [−]Expand description
The “Server” class provides a way for manipulating servers and retrieving information.
Fields
name: String
puid: String
Implementations
sourceimpl<'lua> Server<'lua>
impl<'lua> Server<'lua>
sourcepub fn is_draining(&self) -> Result<bool>
pub fn is_draining(&self) -> Result<bool>
Returns true if the server is currently draining sticky connections.
sourcepub fn set_maxconn(&self, maxconn: u64) -> Result<()>
pub fn set_maxconn(&self, maxconn: u64) -> Result<()>
Dynamically changes the maximum connections of the server.
sourcepub fn get_maxconn(&self) -> Result<u64>
pub fn get_maxconn(&self) -> Result<u64>
Returns an integer representing the server maximum connections.
sourcepub fn set_weight(&self, weight: &str) -> Result<()>
pub fn set_weight(&self, weight: &str) -> Result<()>
Dynamically changes the weight of the server. See the management socket documentation for more information about the format of the string.
sourcepub fn get_weight(&self) -> Result<u32>
pub fn get_weight(&self) -> Result<u32>
Returns an integer representing the server weight.
sourcepub fn set_addr(&self, addr: String, port: Option<u16>) -> Result<()>
pub fn set_addr(&self, addr: String, port: Option<u16>) -> Result<()>
Dynamically changes the address of the server.
sourcepub fn get_addr(&self) -> Result<String>
pub fn get_addr(&self) -> Result<String>
Returns a string describing the address of the server.
sourcepub fn get_stats(&self) -> Result<Table<'lua>>
pub fn get_stats(&self) -> Result<Table<'lua>>
Returns a table containing the server statistics.
sourcepub fn check_enable(&self) -> Result<()>
pub fn check_enable(&self) -> Result<()>
Enables health checks.
sourcepub fn check_disable(&self) -> Result<()>
pub fn check_disable(&self) -> Result<()>
Disables health checks.
sourcepub fn check_force_up(&self) -> Result<()>
pub fn check_force_up(&self) -> Result<()>
Forces health-check up.
sourcepub fn check_force_nolb(&self) -> Result<()>
pub fn check_force_nolb(&self) -> Result<()>
Forces health-check nolb mode.
sourcepub fn check_force_down(&self) -> Result<()>
pub fn check_force_down(&self) -> Result<()>
Forces health-check down.
sourcepub fn agent_enable(&self) -> Result<()>
pub fn agent_enable(&self) -> Result<()>
Enables agent check.
sourcepub fn agent_disable(&self) -> Result<()>
pub fn agent_disable(&self) -> Result<()>
Disables agent check.
sourcepub fn agent_force_up(&self) -> Result<()>
pub fn agent_force_up(&self) -> Result<()>
Forces agent check up.
sourcepub fn agent_force_down(&self) -> Result<()>
pub fn agent_force_down(&self) -> Result<()>
Forces agent check down.
Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<'lua, T> FromLuaMulti<'lua> for T where
T: FromLua<'lua>,
impl<'lua, T> FromLuaMulti<'lua> for T where
T: FromLua<'lua>,
sourcefn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
fn from_lua_multi(values: MultiValue<'lua>, lua: &'lua Lua) -> Result<T, Error>
Performs the conversion. Read more