Apache::BalancerManager - Interact with the Apache BalancerManager
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; }
The url that the balance manager is running under.
The name of the balancer.
The nonce of the connection (autodetected.)
The user_agent
my $m = $bm->get_member_by_location('http://127.0.0.1:5001')
returns the Apache::BalancerManager::Member with the passed location
my $m = $bm->get_member_by_location(0)
returns the Apache::BalancerManager::Member with the passed index
returns the number of Apache::BalancerManager::Member's that the load balancer contains
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
This software is copyright (c) 2013 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.
To install Apache::BalancerManager, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Apache::BalancerManager
CPAN shell
perl -MCPAN -e shell install Apache::BalancerManager
For more information on module installation, please visit the detailed CPAN module installation guide.