util_ctx

package
v0.0.0-...-24653eb Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIDStr string     = "x-request-id"
	RequestID    ContextKey = "x-request-id"

	TransactionIDStr string     = "transaction-id"
	TransactionID    ContextKey = "transaction-id"
)

Variables

This section is empty.

Functions

func GetRequestID

func GetRequestID(ctx context.Context) string

func GetTransactionID

func GetTransactionID(ctx context.Context) string

func LogCtxFields

func LogCtxFields(ctx context.Context) []any

func SetRequestID

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

func SetTransactionID

func SetTransactionID(ctx context.Context, transactionID string) context.Context

Types

type ContextKey

type ContextKey string

Jump to

Keyboard shortcuts

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