Documentation ¶
Index ¶
- func Close(clients ...*MetricsClient)
- func EmitCounter(name string, value float64, tags map[string]string) error
- func EmitGauge(name string, value float64, tags map[string]string) error
- func EmitTimer(name string, value float64, tags map[string]string) error
- func Init(options ...ClientOption)
- func SetLogFunc(_logfunc func(string, ...interface{}))
- type ClientOption
- type Config
- type MetricsClient
- func (mc *MetricsClient) Close()
- func (mc *MetricsClient) EmitCounter(name string, value float64, tags map[string]string) error
- func (mc *MetricsClient) EmitGauge(name string, value float64, tags map[string]string) error
- func (mc *MetricsClient) EmitTimer(name string, value float64, tags map[string]string) error
- func (mc *MetricsClient) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close(clients ...*MetricsClient)
func Init ¶
func Init(options ...ClientOption)
func SetLogFunc ¶
func SetLogFunc(_logfunc func(string, ...interface{}))
Types ¶
type ClientOption ¶
type ClientOption func(config *Config)
func WithAddress ¶
func WithAddress(address string) ClientOption
func WithPrefix ¶
func WithPrefix(prefix string) ClientOption
type MetricsClient ¶
type MetricsClient struct {
// contains filtered or unexported fields
}
func NewMetricClient ¶
func NewMetricClient(options ...ClientOption) *MetricsClient
func (*MetricsClient) Close ¶
func (mc *MetricsClient) Close()
func (*MetricsClient) EmitCounter ¶
func (*MetricsClient) Start ¶
func (mc *MetricsClient) Start()
Click to show internal directories.
Click to hide internal directories.