turingctx

package
v0.0.0-...-1c6d3df Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// TuringTreatmentChannelKey is used to store a channel to send experiment treatment
	TuringTreatmentChannelKey ctxKeyType
)

Variables

This section is empty.

Functions

func GetKeyValsFromContext

func GetKeyValsFromContext(ctx context.Context) []interface{}

GetKeyValsFromContext retrieves all the possible turing related key-value(s) from the input context as a interface{} slice.

func GetRequestID

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

GetRequestID returns the request id from the input context

func NewTuringContext

func NewTuringContext(parent context.Context) context.Context

NewTuringContext returns a context which holds additional data pertaining to the unique turing request.

func NewTuringContextWithSuffix

func NewTuringContextWithSuffix(parent context.Context, suffix string) context.Context

NewTuringContextWithSuffix returns a context for batch request, with the Turing Request ID set to with the given suffix and initial request context set as parent

Types

This section is empty.

Jump to

Keyboard shortcuts

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