
Net::Telnet::Gearman - interact with a Gearman server through its telnet interface

use Net::Telnet::Gearman;
my $session = Net::Telnet::Gearman->new(
Host => '127.0.0.1',
Port => 4730,
);
my @workers = $session->workers();
my @functions = $session->status();
my $version = $session->version();
my $result = $session->maxqueue( reverse => 15 );
$session->shutdown('graceful');

This is currently only tested with Gearman v0.10.

This is the same as in Net::Telnet except for that there is called $self->open() for you.
This sends back a list of all workers, their file descriptors, their IPs, their IDs, and a list of registered functions they can perform.
See also: Net::Telnet::Gearman::Worker
This method accepts any parameters the Net::Telnet getline method does accept.
This sends back a list of all registered functions. Next to each function is the number of jobs in the queue, the number of running jobs, and the number of capable workers.
See also: Net::Telnet::Gearman::Function
This method accepts any parameters the Net::Telnet getline method does accept.
This sets the maximum queue size for a function. If no size is given, the default is used. If the size is negative, then the queue is set to be unlimited. This sends back a single line with "OK".
Arguments:
Shutdown the server. If the optional "graceful" argument is used, close the listening socket and let all existing connections complete.
Arguments:
Send back the version of the server.

Johannes Plunien <plu@cpan.org>

Copyright 2009 by Johannes Plunien
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

