Documentation ¶
Index ¶
- type Metrics
- func (m *Metrics) GetRegistry() metrics.Registry
- func (m *Metrics) Graphite(freq time.Duration, prefix string, addr *net.TCPAddr)
- func (m *Metrics) InfluxDB(freq time.Duration, url, database, username, password string)
- func (m *Metrics) InfluxDBWithTags(freq time.Duration, url, database, username, password string, ...)
- func (m *Metrics) Log(freq time.Duration, l metrics.Logger)
- func (m *Metrics) MemStats()
- func (m *Metrics) WithPrefix(s string) string
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func (*Metrics) GetRegistry ¶
func (m *Metrics) GetRegistry() metrics.Registry
func (*Metrics) Graphite ¶
Graphite reports metrics into graphite.// // addr, _ := net.ResolveTCPAddr("tcp", "127.0.0.1:2003")// m.Graphite(10e9, "metrics", addr)//
func (*Metrics) InfluxDB ¶
InfluxDB reports metrics into influxdb.// // m.InfluxDB(10e9, "http://127.0.0.1:8086","metrics", "test","test"})//
func (*Metrics) InfluxDBWithTags ¶
func (m *Metrics) InfluxDBWithTags(freq time.Duration, url, database, username, password string, tags map[string]string)
InfluxDBWithTags reports metrics into influxdb with tags.// you can set node info into tags.// // m.InfluxDBWithTags(10e9, "http://127.0.0.1:8086","metrics", "test","test", map[string]string{"host":"127.0.0.1"})//
func (*Metrics) WithPrefix ¶
Click to show internal directories.
Click to hide internal directories.