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