|
hace 2 años | |
---|---|---|
.. | ||
LICENSE | hace 2 años | |
README.md | hace 2 años | |
encoder.go | hace 2 años | |
escape.go | hace 2 años | |
go.mod | hace 2 años | |
go.sum | hace 2 años | |
handler.go | hace 2 años | |
machine.go | hace 2 años | |
machine.go.rl | hace 2 años | |
metric.go | hace 2 años | |
parser.go | hace 2 años | |
writer.go | hace 2 años |
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