diff options
| author | Paul Buetow <paul@buetow.org> | 2021-08-21 14:54:24 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-08-21 14:54:24 +0300 |
| commit | c2522ffb59514443816a96386c16bb7527cbe57c (patch) | |
| tree | 6e6fb065e14b92e362f66103cfed2cbdc51ceccf /internal/mapr | |
| parent | 70cc67e78278fcf103acc57dfe513bd6f5f258c9 (diff) | |
read files bytewise for more control of whats happening - change transport protocol for more control over newlines
Diffstat (limited to 'internal/mapr')
| -rw-r--r-- | internal/mapr/aggregateset.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/internal/mapr/aggregateset.go b/internal/mapr/aggregateset.go index a6cc6eb..029d87b 100644 --- a/internal/mapr/aggregateset.go +++ b/internal/mapr/aggregateset.go @@ -5,6 +5,8 @@ import ( "fmt" "strconv" "strings" + + "github.com/mimecast/dtail/internal/protocol" ) // AggregateSet represents aggregated key/value pairs from the @@ -70,20 +72,20 @@ func (s *AggregateSet) Serialize(ctx context.Context, groupKey string, ch chan<- var sb strings.Builder sb.WriteString(groupKey) - sb.WriteString("ā") - sb.WriteString(fmt.Sprintf("%dā", s.Samples)) + sb.WriteString(protocol.AggregateDelimiter) + sb.WriteString(fmt.Sprintf("%d%s", s.Samples, protocol.AggregateDelimiter)) for k, v := range s.FValues { sb.WriteString(k) sb.WriteString("=") - sb.WriteString(fmt.Sprintf("%vā", v)) + sb.WriteString(fmt.Sprintf("%v%s", v, protocol.AggregateDelimiter)) } for k, v := range s.SValues { sb.WriteString(k) sb.WriteString("=") sb.WriteString(v) - sb.WriteString("ā") + sb.WriteString(protocol.AggregateDelimiter) } select { |
