|
|
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