correlation

package
v0.73.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2022 License: Apache-2.0 Imports: 3 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 GetOrSetHeaderID added in v0.66.0

func GetOrSetHeaderID(h http.Header) string

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