reqid

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package reqid stores and retrieves the per-request correlation ID used across logging boundaries. It exists as a tiny, dependency-free package so that lower-level packages (e.g. internal/providers/multisource) can read the request_id from context without importing internal/connect, which would form an import cycle (connect depends on multisource via the provider interface).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func From

func From(ctx context.Context) string

From returns the request id stored in ctx, or empty string if absent. Safe to call from any package; the unexported ctxKey prevents collisions.

func With

func With(ctx context.Context, id string) context.Context

With returns a copy of ctx that carries the given request id.

Types

This section is empty.

Jump to

Keyboard shortcuts

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