telemetry_decode

package
v0.0.0-...-fc0abaf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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

  1. if encoding is json, pretty print to out file
  2. 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
  3. 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
  4. 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

func (o *MdtOut) MdtOutSetEncoding(encoding string)

type Plug

type Plug struct {
	Path string

	Symbols map[string]interface{}
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL