Documentation ¶
Index ¶
Constants ¶
View Source
const ( // BackendName is the name of this backend. BackendName = "statsdaemon" // DefaultDialTimeout is the default net.Dial timeout. DefaultDialTimeout = 5 * time.Second // DefaultWriteTimeout is the default socket write timeout. DefaultWriteTimeout = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func NewClientFromViper ¶
func NewClientFromViper(v *viper.Viper, logger logrus.FieldLogger, pool *transport.TransportPool) (gostatsd.Backend, error)
NewClientFromViper constructs a statsd client by connecting to an address.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an object that is used to send messages to a statsd server's UDP or TCP interface.
func NewClient ¶
func NewClient(address string, dialTimeout, writeTimeout time.Duration, disableTags, tcpTransport bool, tlsConfig *tls.Config, logger logrus.FieldLogger) (*Client, error)
NewClient constructs a new statsd backend client.
func (*Client) SendMetricsAsync ¶
func (client *Client) SendMetricsAsync(ctx context.Context, metrics *gostatsd.MetricMap, cb gostatsd.SendCallback)
SendMetricsAsync flushes the metrics to the statsd server, preparing payload synchronously but doing the send asynchronously.
Click to show internal directories.
Click to hide internal directories.