xcontext

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRequestID

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

func GetSessionID

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

func GetWhoopUserID

func GetWhoopUserID(ctx context.Context) (int64, bool)

func IsShutdownInProgress

func IsShutdownInProgress(ctx context.Context) bool

IsShutdownInProgress checks if the context is marked as being in a shutdown state. Returns false if the shutdown flag is not set or is explicitly set to false.

func SetRequestID

func SetRequestID(ctx context.Context, requestID string) context.Context

func SetSessionID

func SetSessionID(ctx context.Context, sessionID string) context.Context

func SetShutdownInProgress

func SetShutdownInProgress(ctx context.Context, inProgress bool) context.Context

SetShutdownInProgress marks the context as being in a shutdown state. This allows handlers to distinguish between normal client disconnects and server-initiated shutdowns for better logging and cleanup.

func SetWhoopUserID

func SetWhoopUserID(ctx context.Context, whoopUserID int64) context.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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