MCPcopy Create free account
hub / github.com/algolia/cli / WithTelemetryClient

Function WithTelemetryClient

pkg/telemetry/telemetry.go:171–173  ·  view source on GitHub ↗

WithTelemetryClient returns a new copy of context.Context with the provided telemetryClient

(ctx context.Context, client TelemetryClient)

Source from the content-addressed store, hash-verified

169
170// WithTelemetryClient returns a new copy of context.Context with the provided telemetryClient
171func WithTelemetryClient(ctx context.Context, client TelemetryClient) context.Context {
172 return context.WithValue(ctx, telemetryClientKey{}, client)
173}
174
175// GetTelemetryClient returns the CLIAnalyticsEventMetadata from the provided context
176func GetTelemetryClient(ctx context.Context) TelemetryClient {

Calls

no outgoing calls