Implement json tracer transport

This commit is contained in:
Matija Petrunic 2021-09-15 13:41:03 +02:00
parent 8e6a01de6d
commit ab86c5419d

View File

@ -0,0 +1,20 @@
package tracer
import (
"os"
)
type jsonTracerTransport struct {
out *os.File
}
func NewJsonTracerTransport(out *os.File) TracerTransport {
return &jsonTracerTransport{
out: out,
}
}
func (jtt *jsonTracerTransport) Transport(jsonEvent []byte) error {
_, err := jtt.out.Write(jsonEvent)
return err
}