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

Method maxAttempts

pkg/tools/lifecycle/supervisor.go:134–139  ·  view source on GitHub ↗

maxAttempts resolves MaxAttempts to an effective value: 0 → default 5, negative → unlimited (returned as -1), positive → as configured.

()

Source from the content-addressed store, hash-verified

132// maxAttempts resolves MaxAttempts to an effective value: 0 → default 5,
133// negative → unlimited (returned as -1), positive → as configured.
134func (p Policy) maxAttempts() int {
135 if p.MaxAttempts == 0 {
136 return 5
137 }
138 return p.MaxAttempts
139}
140
141// logger returns p.Logger or slog.Default if nil.
142func (p Policy) logger() *slog.Logger {

Callers 1

tryRestartMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected