pub fn new(statsd_hosts: Vec<String>, packet_limit: usize) -> Statsd {
        let connections = statsd_hosts.iter().map(|host| {
            println!("Opening socket to another statsd server {}", host);
            StatsdConnection {
                socket: open_new_udp_connection(host.clone()),
                remote_statsd: host.clone(),
            }
        }).collect();
        Statsd {
            connections: connections,
            packet_limit: packet_limit,
        }
    }
/// Create a Statsd that sends aggregated metrics to other statsd instance
///
/// # Examples
///
/// ```
/// let cons = Statsd::new("127.0.0.1", 8125, 1024);
/// ```
Create a Statsd that sends aggregated metrics to other statsd instance
Create a Statsd that sends aggregated metrics to other statsd instance
pub fn new(statsd_hosts: Vec<String>, packet_limit: usize) -> Statsd {
        let connections = statsd_hosts.iter().map(|host| {
            println!("Opening socket to another statsd server {}", host);
            StatsdConnection {
                socket: open_new_udp_connection(host.clone()),
                remote_statsd: host.clone(),
            }
        }).collect();
        Statsd {
            connections: connections,
            packet_limit: packet_limit,
        }
    }
pub fn new ( statsd_hosts : Vec < String > , packet_limit : usize ) -> Statsd { let connections = statsd_hosts . iter ( ) . map ( | host | { println ! ( " " host ) ; StatsdConnection { socket : open_new_udp_connection ( host . clone ( ) ) , remote_statsd : host . clone ( ) , } } ) . collect ( ) ; Statsd { connections : connections , packet_limit : packet_limit , } }
Create a Statsd that sends aggregated metrics to other statsd instance
Create a Statsd that sends aggregated metrics to other statsd instance
statsd_hosts
Vec<String>
packet_limit
usize
examples
None