Clutch::Client - distributed job system's client class
# client script use strict; use warnings; use Clutch::Client; my $args = shift || die 'missing args'; my $client = Clutch::Client->new( servers => [ "$worker_ip:$worker_port" ], ); my $res = $client->request('echo', $args); print $res, "\n";
The value is a reference to an array of worker addresses.
The server address is in the form host:port for network TCP connections
Client will distribute basic RoundRobin.
seconds until timeout (default: 10)
worker process function name.
get over client argument for worker process.
$args must be single line data.
When the worker accepts the background request and returns the "OK"
worker response here. The result is order request.
To install Clutch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clutch
CPAN shell
perl -MCPAN -e shell install Clutch
For more information on module installation, please visit the detailed CPAN module installation guide.