NAME
Apache::BalancerManager - Interact with the Apache BalancerManager
SYNOPSIS
my $mgr = Apache::BalancerManager->new(
url => 'http://127.0.0.1/balancer-manager',
);
my @services = (1..8);
for my $backend (@services) {
my $m = $mgr->get_member_by_location(
sprintf 'http://127.0.0.1:50%02i', $_
);
$m->disable;
$m->update;
system('service', "backend_web_$_", 'restart');
$m->enable;
$m->update;
}
ATTRIBUTES
url
The url that the balance manager is running under.
name
The name of the balancer.
nonce
The nonce of the connection (autodetected.)
user_agent
The user_agent
METHODS
new
get_member_by_location
my $m = $bm->get_member_by_location('http://127.0.0.1:5001')
returns the Apache::BalancerManager::Member with the passed location
get_member_by_index
my $m = $bm->get_member_by_location(0)
returns the Apache::BalancerManager::Member with the passed index
member_count
returns the number of Apache::BalancerManager::Member's that the load balancer contains
AUTHORS
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
Wes Malone <wesm@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by Arthur Axel "fREW" Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.