example.go 204 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
package main

import (
	"github.com/kisielk/gostatsd/statsd"
	"log"
)

func main() {
	f := func(m statsd.Metric) {
		log.Printf("%s", m)
	}
	r := statsd.MetricReceiver{":8125", f}
	r.ListenAndReceive()
}