Documentation ¶
Index ¶
Constants ¶
View Source
const ProtocCommandString string = "protoc --decode=TelemetryData "
View Source
const ProtocRawDecode string = "protoc --decode_raw "
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MdtOut ¶
type MdtOut struct { OutFile string Encoding string Decode_raw bool DontClean bool ProtoFile string PluginDir string PluginFile string DataChan <-chan []byte // contains filtered or unexported fields }
///////////////////////////////////////////////////////////////////// ///// O U T P U T M E S S A G E H A N D L E R /////// /////////////////////////////////////////////////////////////////////
func (*MdtOut) MdtOutLoop ¶
func (o *MdtOut) MdtOutLoop()
message handler
- if encoding is json, pretty print to out file
- if decode_raw is set, a) write the message to tmp file, execute protoc command with --decode_raw option protoc --decode_raw < tmpfile b) print to output file protoc is expected to be present in the PATH, minimum version 3.0.0
- if proto file specified in arguments, a) write the message to tmp file, execute protoc with --decode option protoc --decode=Telemetry <proto> < tmpfile b) write the output to out file
- if none of above, unmarshal message using telemetry.proto a) if self-describing-gpb message, write to outfile b) if gpb(compact), i) using encoding_path find the plugin for the proto ii) if found, decode key and content of all rows using exported symbols from plugin write telemetry header and rows to out file iii) if not found, write the raw content to out file
func (*MdtOut) MdtOutSetEncoding ¶
Click to show internal directories.
Click to hide internal directories.