xrid

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: MIT Imports: 6 Imported by: 0

README

xrid

Correlation ID Middleware Handler for Go

Documentation

Overview

Package xrid provides a middleware handler for setting or passing on the correlation ID from the `X-Request-ID header. The handler sets the value if it doesn't exist.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext returns the correlation ID stored in the given context.

func Handler

func Handler(next http.Handler) http.Handler

Handler wraps the provided handler with one which passes the request id to the next handler and sets it on the response.

Types

This section is empty.

Jump to

Keyboard shortcuts

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