github.com/phillinzzz/newBsc@v1.1.6/metrics/opentsdb_test.go (about) 1 package metrics 2 3 import ( 4 "net" 5 "time" 6 ) 7 8 func ExampleOpenTSDB() { 9 addr, _ := net.ResolveTCPAddr("net", ":2003") 10 go OpenTSDB(DefaultRegistry, 1*time.Second, "some.prefix", addr) 11 } 12 13 func ExampleOpenTSDBWithConfig() { 14 addr, _ := net.ResolveTCPAddr("net", ":2003") 15 go OpenTSDBWithConfig(OpenTSDBConfig{ 16 Addr: addr, 17 Registry: DefaultRegistry, 18 FlushInterval: 1 * time.Second, 19 DurationUnit: time.Millisecond, 20 }) 21 }