Supervisor::RPC::Client - The client interface to the Supervisors environment
use Supervisor::RPC::Client; my $rpc = Supervisor::RPC::Client->new() my $result = $rpc->start('sleeper');
This is the client module for external access to the Supervisor. It provides methods to start/stop/reload and retrieve the status of managed processes.
This initilaize the module and can take two parameters.
Example: my $rpc = Supervisor::RPC::Client->new( -port => 9505, -address => 'localhost' };
This method will start a managed process. It takes one parameter, the name of the process, and returns "started" if successful.
Example: my $result = $rpc->start('sleeper');
This method will stop a managed process. It takes one parameter, the name of the process, and returns "stopped" if successful.
Example: my $result = $rpc->stop('sleeper');
This method will do a "stat" on a managed process. It takes one parameter, the name of the process, and returns "alive" if the process is running or "dead" if the process is not.
This method will attempt to "reload" a managed process. It takes one parameter, the name of the process. It will return "reloaded".
Example: my $result = $rpc->reload('sleeper');
Supervisor Supervisor::Base Supervisor::Class Supervisor::Constants Supervisor::Controller Supervisor::Log Supervisor::Process Supervisor::ProcessFactory Supervisor::Session Supervisor::Utils Supervisor::RPC::Server Supervisor::RPC::Client
Kevin L. Esteb, <kesteb@wsipc.org>
Copyright (C) 2009 by Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.
To install Supervisor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Supervisor
CPAN shell
perl -MCPAN -e shell install Supervisor
For more information on module installation, please visit the detailed CPAN module installation guide.