rxid

package
v0.0.0-...-61732bf Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext returns the RequestID value. It panics if not set.

func Handler

func Handler(next http.Handler) http.Handler

Handler wraps other handlers and adds the request id to incoming requests as well as sets the request id on the response.

func NewContextWithID

func NewContextWithID(ctx context.Context, r *http.Request) context.Context

NewContextWithID will get the incoming context off of the request or create a new one. The ctx with the ID is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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