correlationid

package
v0.0.0-...-d76060a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKey = "correlationid"

ContextKey is the key the retrieved (or generated) correlation ID is stored under in the gin Context.

Variables

This section is empty.

Functions

func Logger

func Logger(logger log.Logger, ctx *gin.Context) log.Logger

Logger returns a new logger instance with a correlation ID in it.

func Middleware

func Middleware(opts ...MiddlewareOption) gin.HandlerFunc

Middleware returns a gin compatible handler.

Types

type Header string

Header configures the header from where the correlation ID will be retrieved.

type MiddlewareOption

type MiddlewareOption interface {
	// contains filtered or unexported methods
}

MiddlewareOption configures the correlation ID middleware.

Jump to

Keyboard shortcuts

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