correlation

package
v0.0.0-...-c687db1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package correlation provides correlation semantics for use across service boundaries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) xid.ID

FromContext fetches the correlation ID from the context, or returns a nil ID if not found.

func With

func With(ctx context.Context) context.Context

With adds a new correlation ID to the context if one has not already been added.

func WithID

func WithID(ctx context.Context, id xid.ID) context.Context

WithID adds the specified correlation ID to the context unconditionally, overwriting any correlation ID already present. If the given ID is nil, then a new ID will be used.

Types

This section is empty.

Jump to

Keyboard shortcuts

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