mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-20 11:55:18 +00:00
22 lines
438 B
Go
22 lines
438 B
Go
|
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,
|
||
|
})
|
||
|
}
|