|
2 년 전 | |
---|---|---|
.. | ||
LICENSE | 2 년 전 | |
README.md | 2 년 전 | |
encoder.go | 2 년 전 | |
escape.go | 2 년 전 | |
go.mod | 2 년 전 | |
go.sum | 2 년 전 | |
handler.go | 2 년 전 | |
machine.go | 2 년 전 | |
machine.go.rl | 2 년 전 | |
metric.go | 2 년 전 | |
parser.go | 2 년 전 | |
writer.go | 2 년 전 |
This is an encoder for the influx line protocol.
It has an interface similar to the standard library's json.Encoder
.
Encoder.Encode
concurrently you have to manage the concurrency yourself.buf := &bytes.Buffer{}
serializer := protocol.NewEncoder(buf)
serializer.SetMaxLineBytes(1024)
serializer.SetFieldTypeSupport(UintSupport)
serializer.Encode(e) // where e is something that implements the protocol.Metric interface