encodings

package
v0.0.0-...-c8bf5b5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestHeader_CompressionMethodMask  = 0x07
	RequestHeader_CompressionMethod_NONE = 0x00
	RequestHeader_CompressionMethod_ZLIB = 0x01
	RequestHeader_CompressionMethod_LZ4  = 0x02
)
View Source
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

Jump to

Keyboard shortcuts

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