correlationid

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 4 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 common.Logger, ctx *gin.Context) common.Logger

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

func LogrusLogger

func LogrusLogger(logger logrus.FieldLogger, ctx *gin.Context) logrus.FieldLogger

LogrusLogger 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