metrics

package
v0.0.0-...-01a1068 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Database string
)

Functions

func Connect

func Connect() error

func Decr

func Decr(key string)

func Incr

func Incr(key string)

func RecordHTTPResponse

func RecordHTTPResponse(process func() (*http.Response, error)) (*http.Response, error)

func Stats

func Stats(interval time.Duration)

func Write

func Write(name string, tags map[string]string, fields map[string]interface{}) error

Types

type MetricWriter

type MetricWriter interface {
	Write(influx.BatchPoints) error
}

type NullWriter

type NullWriter struct{}

The writer used for testing

func (NullWriter) Close

func (nw NullWriter) Close() error

func (NullWriter) Ping

func (nw NullWriter) Ping(timeout time.Duration) (time.Duration, string, error)

Ping checks that status of cluster, and will always return 0 time and no error for UDP clients

func (NullWriter) Query

func (nw NullWriter) Query(q influx.Query) (*influx.Response, error)

func (NullWriter) Write

func (nw NullWriter) Write(bp influx.BatchPoints) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL