| 1 | package Net::Async::Statsd; | ||
| 2 | # ABSTRACT: IO::Async support for statsd/graphite | ||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 1 | our $VERSION = '0.004'; | |
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | Net::Async::Statsd - asynchronous API for Etsy's statsd protocol | ||
| 11 | |||
| 12 | =head1 VERSION | ||
| 13 | |||
| 14 | Version 0.004 | ||
| 15 | |||
| 16 | =head1 SYNOPSIS | ||
| 17 | |||
| 18 | use Future; | ||
| 19 | use IO::Async::Loop; | ||
| 20 | use Net::Async::Statsd::Client; | ||
| 21 | my $loop = IO::Async::Loop->new; | ||
| 22 | $loop->add(my $statsd = Net::Async::Statsd::Client->new( | ||
| 23 | host => 'localhost', | ||
| 24 | port => 3001, | ||
| 25 | )); | ||
| 26 | Future->needs_all( | ||
| 27 | $statsd->timing( | ||
| 28 | 'some.task' => 133, | ||
| 29 | ), | ||
| 30 | $statsd->gauge( | ||
| 31 | 'some.value' => 80, | ||
| 32 | ) | ||
| 33 | )->get; | ||
| 34 | |||
| 35 | =head1 DESCRIPTION | ||
| 36 | |||
| 37 | Provides an asynchronous API for statsd. | ||
| 38 | |||
| 39 | You probably wanted the client implementation - see L<Net::Async::Statsd::Client>. | ||
| 40 | There's a basic server implementation in L<Net::Async::Statsd::Server>, note that | ||
| 41 | this does little more than accept traffic and raise events. | ||
| 42 | |||
| 43 | If you're not using L<IO::Async>, this module is probably not what you wanted. | ||
| 44 | See L<Net::Statsd> instead. | ||
| 45 | |||
| 46 | =cut | ||
| 47 | |||
| 48 | 1 | ▶ | use Net::Async::Statsd::Server; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 49 | 1 | ▶ | use Net::Async::Statsd::Client; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 50 | |||
| 51 | 1 | 1; | |
| 52 | |||
| 53 | __END__ | ||