requestid

package
v0.0.0-...-4b66723 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(c context.Context) string

FromContext retrieves the request ID from the given context.

Parameters: - c: The context from which the request ID will be retrieved.

Returns: - The request ID as a string if present in the context; otherwise, returns an empty string.

func SetContext

func SetContext(ctx context.Context, c *fiber.Ctx) context.Context

SetContext adds the request ID from the fiber context (c) to the provided context (ctx). It returns a new context with the request ID included.

Parameters: - ctx: The context to which the request ID will be added. - c: The fiber context containing the request ID.

Returns: - A new context with the 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