hlpr

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INVALID_VALUE_COUNT     = "invalid number of values"
	VERSION_INVALID_LENGTH  = "invalid version length"
	TRACEID_INVALID_LENGTH  = "invalid traceid length"
	PARENTID_INVALID_LENGTH = "invalid parentid length"
	FLAG_INVALID_LENGTH     = "invalid flag length"
	TRACEID_IS_ZERO         = "error traceid value is zero"
	PARENTID_IS_ZERO        = "error parentid value is zero"
)

Variables

This section is empty.

Functions

func GenerateNewTraceparent

func GenerateNewTraceparent(sampled bool) (string, error)

func GenerateParentId

func GenerateParentId() (string, error)

Counting on go compiler to inline these plsplspls :)

func GenerateParentIdRaw

func GenerateParentIdRaw() ([]byte, error)

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

func GenerateTraceId

func GenerateTraceId() (string, error)

func GenerateTraceIdRaw

func GenerateTraceIdRaw() ([]byte, error)

func ParseTraceparent

func ParseTraceparent(
	traceparent string,
) (string, string, string, string, error)

func ParseTraceparentRaw

func ParseTraceparentRaw(
	traceparent string,
) ([]byte, []byte, []byte, []byte, error)

func ValidateParentIdValue

func ValidateParentIdValue(parentId []byte) error

func ValidateTraceIdValue

func ValidateTraceIdValue(traceId []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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