tracesegment

package
v0.116.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ProtocolSeparator = '\n'

ProtocolSeparator is the character used to split the header and body in an X-Ray segment

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Format  string `json:"format"`
	Version int    `json:"version"`
}

Header stores header of trace segment.

func SplitHeaderBody added in v0.9.0

func SplitHeaderBody(buf []byte) (*Header, []byte, error)

SplitHeaderBody separates header and body from `buf` using a known separator: ProtocolSeparator. It returns the body of the segment if: 1. header and body can be correctly separated 2. header is valid

func (Header) IsValid

func (t Header) IsValid() bool

IsValid validates Header.

Jump to

Keyboard shortcuts

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