Mojolicious::Plugin::RedisSubscriber
use Mojolicious::Plugin::RedisSubscriber; my $redis = Mojolicious::Plugin::RedisSubscriber->new; my $cb = $redis->subscribe("feed::frxEURUSD", sub { ... }); ...; $redis->unsubscribe("feed::frxEURUSD", $cb);
Module subscribes to specified channels and emits events when there are messages.
Module provides the following methods:
Returns the underlying subscriber object.
Returns reference to list of channel names to which redis is subscribed.
returns the underlying redis server object.
Ensures that module subscribed to specified redis channels and adds $callback to the list invoked when there's a message in channel
Unsubscribes $callback from the $channel
Configuration vs config yml files, particularly regarding default channels
Copyright (C) 2015 Regent Markets. This may be distributed under the same terms as Perl itself.
To install Mojolicious::Plugin::RedisSubscriber, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::RedisSubscriber
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::RedisSubscriber
For more information on module installation, please visit the detailed CPAN module installation guide.