requestid

package
v0.0.4-alpha Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package requestid provides lightweight request ID generation for log correlation. IDs use the format hostname-counter for uniqueness per host without crypto overhead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) string

FromContext retrieves the request ID from context, or empty string if absent.

func New

func New() string

New generates a request ID in the format "hostname-counter".

func WithContext

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

WithContext stores a request ID in the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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