contexttools

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CorrelationIDKey is context key for correlation ID.
	CorrelationIDKey = "k_correlation_id"
	// StartRequestTimestampKey is context key for start request timestamp.
	StartRequestTimestampKey = "k_start_request_timestamp"
	// ServiceVersionKey is context key for service version.
	ServiceVersionKey = "k_service_version"
	// IPAddressKey is context key for request IP address.
	IPAddressKey = "k_ip"
	// UserIDKey is context key for request user ID.
	UserIDKey = "k_user_id"
	// SessionIDKey is context key for request session ID.
	SessionIDKey = "k_session_id"
)

Variables

This section is empty.

Functions

func GetValue

func GetValue(ctx context.Context, key string) string

GetValue get value from context.Context by key

func SetValue

func SetValue(ctx context.Context, key, value string) context.Context

SetValue set string value with key into 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