correlation

package
v0.41.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HeaderID constant.
	HeaderID string = "X-Correlation-Id"
	// ID constant.
	ID string = "correlationID"
)

Variables

This section is empty.

Functions

func ContextWithID

func ContextWithID(ctx context.Context, correlationID string) context.Context

ContextWithID sets a correlation ID to a context.

func IDFromContext

func IDFromContext(ctx context.Context) string

IDFromContext returns the correlation ID from the context. If no ID is set a new one is generated.

Types

This section is empty.

Jump to

Keyboard shortcuts

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