correlation

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// HeaderName is the canonical correlation identifier header.
	HeaderName = "X-OngoingAI-Correlation-ID"
)

Variables

This section is empty.

Functions

func EnsureRequest

func EnsureRequest(req *http.Request) (*http.Request, string)

EnsureRequest guarantees a stable correlation identifier on the request context and request headers.

func FromContext

func FromContext(ctx context.Context) (string, bool)

FromContext extracts a normalized correlation identifier from context.

func FromHeaders

func FromHeaders(headers http.Header) string

FromHeaders extracts a normalized correlation identifier from known headers.

func NewID

func NewID() string

NewID returns a new gateway correlation identifier.

func WithContext

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

WithContext stores a normalized correlation identifier in context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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