mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-03-10 01:19:29 +00:00
Several packages are only used while running the e2e suite. These packages are less important to update, as the they can not influence the final executable that is part of the Ceph-CSI container-image. By moving these dependencies out of the main Ceph-CSI go.mod, it is easier to identify if a reported CVE affects Ceph-CSI, or only the testing (like most of the Kubernetes CVEs). Signed-off-by: Niels de Vos <ndevos@ibm.com>
29 lines
936 B
Go
29 lines
936 B
Go
// Copyright The OpenTelemetry Authors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package baggage // import "go.opentelemetry.io/otel/baggage"
|
|
|
|
import (
|
|
"context"
|
|
|
|
"go.opentelemetry.io/otel/internal/baggage"
|
|
)
|
|
|
|
// ContextWithBaggage returns a copy of parent with baggage.
|
|
func ContextWithBaggage(parent context.Context, b Baggage) context.Context {
|
|
// Delegate so any hooks for the OpenTracing bridge are handled.
|
|
return baggage.ContextWithList(parent, b.list)
|
|
}
|
|
|
|
// ContextWithoutBaggage returns a copy of parent with no baggage.
|
|
func ContextWithoutBaggage(parent context.Context) context.Context {
|
|
// Delegate so any hooks for the OpenTracing bridge are handled.
|
|
return baggage.ContextWithList(parent, nil)
|
|
}
|
|
|
|
// FromContext returns the baggage contained in ctx.
|
|
func FromContext(ctx context.Context) Baggage {
|
|
// Delegate so any hooks for the OpenTracing bridge are handled.
|
|
return Baggage{list: baggage.ListFromContext(ctx)}
|
|
}
|