utils

package
v0.9.15 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CircleXOR

func CircleXOR(value, src []byte) []byte

CircleXOR performs XOR for 'value' and 'src'. The result is returned as new byte slice. If 'value' is smaller than 'dst', XOR starts from the beginning of 'src'.

func RandTraceID

func RandTraceID() string

RandTraceID returns random traceID in uuid format.

func SetInsTraceID

func SetInsTraceID(ctx context.Context, traceid string) (context.Context, error)

func TraceID

func TraceID(ctx context.Context) string

TraceID returns traceid provided by WithTraceField and ContextWithTrace helpers.

func UInt32ToBytes

func UInt32ToBytes(n uint32) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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