correlation

package
v0.50.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package correlation provides support for correlation id's and propagation.

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