baggage

package
v1.73.0-dev Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All(ctx context.Context) map[string]string

All returns a **copy** of all baggage items in the context,

func Clear

func Clear(ctx context.Context) context.Context

Clear completely removes all baggage items from the context.

func Get

func Get(ctx context.Context, key string) (string, bool)

Get retrieves the value associated with a baggage key. If the key isn't found, it returns an empty string.

func Remove

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

Remove removes the specified key from the baggage (if present).

func Set

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

Set sets or updates a single baggage key/value pair in the context. If the key already exists, this function overwrites the existing value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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