MCPcopy
hub / github.com/docker/docker-agent / WithClient

Function WithClient

pkg/telemetry/context.go:16–18  ·  view source on GitHub ↗

WithClient adds a telemetry client to the context

(ctx context.Context, client *Client)

Source from the content-addressed store, hash-verified

14
15// WithClient adds a telemetry client to the context
16func WithClient(ctx context.Context, client *Client) context.Context {
17 return context.WithValue(ctx, clientContextKey, client)
18}
19
20// FromContext retrieves the telemetry client from context
21func FromContext(ctx context.Context) *Client {

Callers 3

RunFunction · 0.92
TrackCommandMethod · 0.85
TrackServerStartMethod · 0.85

Calls

no outgoing calls

Tested by 2

TrackCommandMethod · 0.68
TrackServerStartMethod · 0.68