|
hai 1 ano | |
---|---|---|
.. | ||
.gitignore | hai 1 ano | |
LICENSE | %!s(int64=2) %!d(string=hai) anos | |
README.md | hai 1 ano | |
encoder.go | hai 1 ano | |
escape.go | %!s(int64=2) %!d(string=hai) anos | |
handler.go | %!s(int64=2) %!d(string=hai) anos | |
machine.go | hai 1 ano | |
machine.go.rl | hai 1 ano | |
metric.go | %!s(int64=2) %!d(string=hai) anos | |
parser.go | %!s(int64=2) %!d(string=hai) anos | |
writer.go | %!s(int64=2) %!d(string=hai) anos |
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