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

Function withBackgroundReconnect

pkg/tools/lifecycle/supervisor.go:26–28  ·  view source on GitHub ↗

withBackgroundReconnect returns a copy of ctx marked as a background reconnect attempt. It is set by tryRestart before calling connector.Connect so the connector can distinguish watcher reconnects from the initial interactive Start.

(ctx context.Context)

Source from the content-addressed store, hash-verified

24// connector.Connect so the connector can distinguish watcher reconnects
25// from the initial interactive Start.
26func withBackgroundReconnect(ctx context.Context) context.Context {
27 return context.WithValue(ctx, backgroundReconnectKey{}, true)
28}
29
30// IsBackgroundReconnect reports whether ctx was created by the supervisor
31// for a background reconnect attempt. Connector.Connect implementations can

Callers 1

tryRestartMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected