|
|
пре 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