MCPcopy Create free account
hub / github.com/docker/cli / defaultRestartCondition

Function defaultRestartCondition

cli/command/service/opts.go:301–312  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

299}
300
301func defaultRestartCondition() swarm.RestartPolicyCondition {
302 switch defaults.Service.Task.Restart.Condition {
303 case api.RestartOnNone:
304 return swarm.RestartPolicyConditionNone
305 case api.RestartOnFailure:
306 return swarm.RestartPolicyConditionOnFailure
307 case api.RestartOnAny:
308 return swarm.RestartPolicyConditionAny
309 default:
310 return ""
311 }
312}
313
314func defaultOrder(order api.UpdateConfig_UpdateOrder) string {
315 switch order {

Callers 2

defaultRestartPolicyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…