trace

package
v0.0.0-...-b7732f5 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const TraceIdHeaderKey = "X-Request-Id"

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) (traceId string, ok bool)

func FromHeader

func FromHeader(header http.Header) (traceId string, ok bool)

func FromRequest

func FromRequest(req *http.Request) (traceId string, ok bool)

func NewContext

func NewContext(ctx context.Context, traceId string) context.Context

func NewTraceId

func NewTraceId() string

Types

type Tracer

type Tracer interface {
	TraceId() string
}

Jump to

Keyboard shortcuts

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