GrwothForecast::Aggregator::Callback - Aggregate by callback
my $aggregator = GrowthForecast::Aggregator::Callback->new( service => 'blog', section => 'entry', name => 'count', code => sub { ... return $n; # return the metrics value }, ); my $res = $aggregator->run(...);
This aggregator aggregates data from RDBMS, and post it to GrowthForecast.
Section name.
This module send request to "/api/$service/$section/$name"
Name of the metrics.
Description of the query. The module post it as 'description' parameter.
Callback function to return metrics value.
Service name.
Endpoint URL, contains '/api'.
E.g. http://example.com/api/
Instance of HTTP client. I tested on Furl.
To install GrowthForecast::Aggregator::Declare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GrowthForecast::Aggregator::Declare
CPAN shell
perl -MCPAN -e shell install GrowthForecast::Aggregator::Declare
For more information on module installation, please visit the detailed CPAN module installation guide.