Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFromBase64Carrier ¶
func ExtractFromBase64Carrier(ctx context.Context, carrier TextMapReader) (outCtx context.Context)
ExtractFromBase64Carrier extracts the pathway context from a carrier to a context object
func InjectToBase64Carrier ¶
func InjectToBase64Carrier(ctx context.Context, carrier TextMapWriter)
InjectToBase64Carrier injects a pathway context from a context object inta a carrier
func MergeContexts ¶
MergeContexts returns the first context which includes the pathway resulting from merging the pathways contained in all contexts. This function should be used in fan-in situations. The current implementation keeps only 1 Pathway. A future implementation could merge multiple Pathways together and put the resulting Pathway in the context.
Types ¶
type Pathway ¶
type Pathway interface { // GetHash returns the hash of the pathway, representing the upstream path of the data. GetHash() uint64 }
type TextMapReader ¶
type TextMapReader interface { // ForeachKey iterates over all keys that exist in the underlying // carrier. It takes a callback function which will be called // using all key/value pairs as arguments. ForeachKey will return // the first error returned by the handler. ForeachKey(handler func(key, val string) error) error }
TextMapReader allows iterating over sets of key/value pairs. Carriers implementing TextMapReader are compatible to be used with Datadog's TextMapPropagator.
type TextMapWriter ¶
type TextMapWriter interface { // Set sets the given key/value pair. Set(key, val string) }
TextMapWriter allows setting key/value pairs of strings on the underlying data structure. Carriers implementing TextMapWriter are compatible to be used with Datadog's TextMapPropagator.