(source *composetypes.UpdateConfig)
| 526 | } |
| 527 | |
| 528 | func 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 | |
| 546 | func convertResources(source composetypes.Resources) (*swarm.ResourceRequirements, error) { |
| 547 | resources := &swarm.ResourceRequirements{} |
searching dependent graphs…