|
|
1 år sedan | |
|---|---|---|
| .. | ||
| .gitignore | 1 år sedan | |
| LICENSE | 3 år sedan | |
| README.md | 1 år sedan | |
| encoder.go | 1 år sedan | |
| escape.go | 3 år sedan | |
| handler.go | 3 år sedan | |
| machine.go | 1 år sedan | |
| machine.go.rl | 1 år sedan | |
| metric.go | 3 år sedan | |
| parser.go | 3 år sedan | |
| writer.go | 3 år sedan | |
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