propagation

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractTextMap

func ExtractTextMap(ctx context.Context, carrier TextMapCarrier) context.Context

ExtractTextMap reads cross-cutting concerns from the TextMap carrier into a Context.

func InjectTextMap

func InjectTextMap(ctx context.Context, carrier TextMapCarrier)

InjectTextMap set cross-cutting concerns from the Context into the TextMap carrier.

Types

type TextMapCarrier

type TextMapCarrier interface {
	// Get returns the value associated with the passed key.
	Get(key string) string
	// Set stores the key-value pair.
	Set(key string, value string)
	// Keys lists the keys stored in this carrier.
	Keys() []string
}

TextMapCarrier is the storage medium used by a TextMapPropagator.

Jump to

Keyboard shortcuts

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