Versions in this module Expand all Collapse all v0 v0.2.0 Aug 20, 2021 v0.1.1 Jul 8, 2021 Changes in this version + const DefaultBufPoolCapacity + const DefaultFlushInterval + const DefaultLogPrefix + const DefaultMaxPacketSize + const DefaultMetricPrefix + const DefaultReconnectInterval + const DefaultReportInterval + const DefaultRetryTimeout + const DefaultSendLoopCount + const DefaultSendQueueCapacity + const TagPlacementName + const TagPlacementSuffix + var TagFormatDatadog = &TagFormat + var TagFormatInfluxDB = &TagFormat + type ClientOptions struct + Addr string + BufPoolCapacity int + DefaultTags []Tag + FlushInterval time.Duration + HBins int + Logger SomeLogger + MaxPacketSize int + MetricPrefix string + ReconnectInterval time.Duration + ReportInterval time.Duration + RetryTimeout time.Duration + SendLoopCount int + SendQueueCapacity int + Size int + TagFormat *TagFormat + type Config struct + Addr string + HBins int + Size int + type Option func(c *ClientOptions) + func BufPoolCapacity(capacity int) Option + func DefaultTags(tags ...Tag) Option + func FlushInterval(interval time.Duration) Option + func Logger(logger SomeLogger) Option + func MaxPacketSize(packetSize int) Option + func MetricPrefix(prefix string) Option + func ReconnectInterval(interval time.Duration) Option + func ReportInterval(interval time.Duration) Option + func RetryTimeout(timeout time.Duration) Option + func SendLoopCount(threads int) Option + func SendQueueCapacity(capacity int) Option + func TagStyle(style *TagFormat) Option + type SomeLogger interface + Printf func(fmt string, args ...interface{}) + type Stats struct + Count uint64 + func New(c *Config, options ...Option) *Stats + func (s *Stats) Decr(stat string, count int64, tags ...Tag) + func (s *Stats) Incr(stat string, count int64, tags ...Tag) + func (s *Stats) PrecisionTiming(stat string, delta time.Duration, tags ...Tag) + func (s *Stats) SetAdd(stat string, value string, tags ...Tag) + func (s *Stats) Timing(stat string, delta int64, tags ...Tag) + func (s *Stats) Unregister() + type Tag struct + func Int64Tag(name string, value int64) Tag + func IntTag(name string, value int) Tag + func StringTag(name, value string) Tag + func (tag Tag) Append(buf []byte, style *TagFormat) []byte + type TagFormat struct + FirstSeparator string + KeyValueSeparator byte + OtherSeparator byte + Placement byte