|
|
il y a 1 an | |
|---|---|---|
| .. | ||
| .gitignore | il y a 1 an | |
| LICENSE | il y a 3 ans | |
| README.md | il y a 1 an | |
| encoder.go | il y a 1 an | |
| escape.go | il y a 3 ans | |
| handler.go | il y a 3 ans | |
| machine.go | il y a 1 an | |
| machine.go.rl | il y a 1 an | |
| metric.go | il y a 3 ans | |
| parser.go | il y a 3 ans | |
| writer.go | il y a 3 ans | |
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