Documentation ¶
Index ¶
- func AppendFloat(dst []byte, val float64, bitSize int) []byte
- func AppendHex(dst, s []byte) []byte
- func AppendKey(dst []byte, key string) []byte
- func AppendMarshalled(dst []byte, v interface{}) []byte
- func AppendMetricTimeMark(buf []byte, reportedAt time.Time) []byte
- func AppendOptQuotedString(dst []byte, s string) []byte
- func AppendString(dst []byte, s string) []byte
- func AppendStrings(dst []byte, vals []string) []byte
- func CutMetricTimeMarkAndEol(dst *[]byte, eol []byte, now time.Time) (bool, time.Duration)
- func EncoderManager() msgencoder.EncoderFactory
- type MetricTimeWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendMarshalled ¶
func AppendOptQuotedString ¶
AppendOptQuotedString only adds quotes when escaped characters or spaces are present.
func AppendString ¶
AppendString encodes the input string to json and appends the encoded string to the input byte slice.
The operation loops though each byte in the string looking for characters that need json or utf8 encoding. If the string does not need encoding, then the string is appended in it's entirety to the byte slice. If we encounter a byte that does need encoding, switch up the operation and perform a byte-by-byte read-encode-append.
func AppendStrings ¶
AppendStrings encodes the input strings to json and appends the encoded string list to the input byte slice.
func CutMetricTimeMarkAndEol ¶
func EncoderManager ¶
func EncoderManager() msgencoder.EncoderFactory
Types ¶
Click to show internal directories.
Click to hide internal directories.