package tracecontext
import "cloud.google.com/go/internal/tracecontext"
Package tracecontext provides encoders and decoders for Stackdriver Trace contexts.
Index ¶
- func Decode(src []byte) (traceID [2]uint64, spanID uint64, opts byte, ok bool)
- func Encode(dst []byte, traceID [2]uint64, spanID uint64, opts byte) (n int)
Functions ¶
func Decode ¶
Decode decodes the src into a trace ID, span ID and options. If src doesn't contain a valid trace context, ok = false is returned.
func Encode ¶
Encode encodes trace ID, span ID and options into dst. The number of bytes written will be returned. If len(dst) isn't big enough to fit the trace context, a negative number is returned.
Source Files ¶
tracecontext.go
- Version
- v0.8.0
- Published
- Jun 14, 2017
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 7 seconds ago –
Tools for package owners.