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

Function convertUpdateConfig

cli/compose/convert/service.go:528–544  ·  view source on GitHub ↗
(source *composetypes.UpdateConfig)

Source from the content-addressed store, hash-verified

526}
527
528func convertUpdateConfig(source *composetypes.UpdateConfig) *swarm.UpdateConfig {
529 if source == nil {
530 return nil
531 }
532 parallel := uint64(1)
533 if source.Parallelism != nil {
534 parallel = *source.Parallelism
535 }
536 return &swarm.UpdateConfig{
537 Parallelism: parallel,
538 Delay: time.Duration(source.Delay),
539 FailureAction: swarm.FailureAction(source.FailureAction),
540 Monitor: time.Duration(source.Monitor),
541 MaxFailureRatio: source.MaxFailureRatio,
542 Order: swarm.UpdateOrder(source.Order),
543 }
544}
545
546func convertResources(source composetypes.Resources) (*swarm.ResourceRequirements, error) {
547 resources := &swarm.ResourceRequirements{}

Callers 3

ServiceFunction · 0.85

Calls 1

UpdateOrderMethod · 0.80

Tested by 2

Used in the wild real call sites across dependent graphs

searching dependent graphs…