summaryrefslogtreecommitdiff
path: root/internal/mapr
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2021-08-21 14:54:24 +0300
committerPaul Buetow <paul@buetow.org>2021-08-21 14:54:24 +0300
commitc2522ffb59514443816a96386c16bb7527cbe57c (patch)
tree6e6fb065e14b92e362f66103cfed2cbdc51ceccf /internal/mapr
parent70cc67e78278fcf103acc57dfe513bd6f5f258c9 (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.go10
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 {