aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/rcrowley/go-metrics/opentsdb_test.go
blob: 6173d61ab73a532b19ca448abed5fcb14cb1de90 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package metrics

import (
    "net"
    "time"
)

func ExampleOpenTSDB() {
    addr, _ := net.ResolveTCPAddr("net", ":2003")
    go OpenTSDB(DefaultRegistry, 1*time.Second, "some.prefix", addr)
}

func ExampleOpenTSDBWithConfig() {
    addr, _ := net.ResolveTCPAddr("net", ":2003")
    go OpenTSDBWithConfig(OpenTSDBConfig{
        Addr:          addr,
        Registry:      DefaultRegistry,
        FlushInterval: 1 * time.Second,
        DurationUnit:  time.Millisecond,
    })
}