Documentation
¶
Index ¶
Constants ¶
const ( RequestHeader_CompressionMethodMask = 0x07 RequestHeader_CompressionMethod_NONE = 0x00 RequestHeader_CompressionMethod_ZLIB = 0x01 RequestHeader_CompressionMethod_LZ4 = 0x02 )
const RequestHeaderSize = 1
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(messageBytes []byte) *otlptracecol.ExportTraceServiceRequest
Decode a continuous message of bytes into a RequestBody. This function perform the reverse of Encode operation.
func Encode ¶
func Encode( requestBody proto.Message, compression experimental.CompressionMethod, ) []byte
Encode request body into a message of continuous bytes. The message starts with one by specifying the length of the RequestHeader, followed by RequestHeader encoded in Protobuf format, followed by RequestBody encoded in Protobuf format. +--------------------+-------------------------------------------+-----------------------------------------+ + Header Length Byte | Variable length Header (Protobuf-encoded) | Variable length Body (Protobuf-encoded) | +--------------------+-------------------------------------------+-----------------------------------------+
Types ¶
type RequestHeader ¶
type RequestHeader byte