|
|
há 1 ano atrás | |
|---|---|---|
| .. | ||
| .gitignore | há 1 ano atrás | |
| LICENSE | há 3 anos atrás | |
| README.md | há 1 ano atrás | |
| encoder.go | há 1 ano atrás | |
| escape.go | há 3 anos atrás | |
| handler.go | há 3 anos atrás | |
| machine.go | há 1 ano atrás | |
| machine.go.rl | há 1 ano atrás | |
| metric.go | há 3 anos atrás | |
| parser.go | há 3 anos atrás | |
| writer.go | há 3 anos atrás | |
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