NAME
XAS::Supervisor::RPC::Client - The RPC interface to the XAS Supervisor
SYNOPSIS
use XAS::Supervisor::RPC::Client;
my $rpc = XAS::Supervisor::RPC::Client->new()
my $result = $rpc->start('sleeper');
DESCRIPTION
This is the client module for external access to the XAS Supervisor. It provides methods to start/stop/reload and retrieve the status of managed processes. This module inheirts from XAS::Lib::RPC::JSON::Client.
METHODS
new
This initilaize the module and can take these parameters.
Example:
my $rpc = XAS::Supervisor::RPC::Client->new(
-port => 9505,
-host => 'localhost'
};
start($name)
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');
stop($name)
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');
status($name)
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.
reload($name)
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');
SEE ALSO
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2013 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.8 or, at your option, any later version of Perl 5 you may have available.