MCPcopy
hub / github.com/segmentio/kafka-go / WithMetadata

Function WithMetadata

sasl/sasl.go:57–59  ·  view source on GitHub ↗

WithMetadata returns a copy of the context with associated Metadata.

(ctx context.Context, m *Metadata)

Source from the content-addressed store, hash-verified

55
56// WithMetadata returns a copy of the context with associated Metadata.
57func WithMetadata(ctx context.Context, m *Metadata) context.Context {
58 return context.WithValue(ctx, ctxKey{}, m)
59}
60
61// MetadataFromContext retrieves the Metadata from the context.
62func MetadataFromContext(ctx context.Context) *Metadata {

Callers 4

connectMethod · 0.92
connectMethod · 0.92
TestAwsMskIamMechanismFunction · 0.92
TestAwsMskIamMechanismFunction · 0.92

Calls

no outgoing calls

Tested by 2

TestAwsMskIamMechanismFunction · 0.74
TestAwsMskIamMechanismFunction · 0.74