api/types/swarm: define type for UpdateOrder

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-11-05 11:37:15 +01:00
parent b552b8b729
commit d299e5be83
3 changed files with 16 additions and 8 deletions

View File

@@ -678,7 +678,7 @@ func setInstances(replicas int) testdaemon.ServiceConstructor {
}
}
func setUpdateOrder(order string) testdaemon.ServiceConstructor {
func setUpdateOrder(order swarm.UpdateOrder) testdaemon.ServiceConstructor {
return func(s *swarm.Service) {
if s.Spec.UpdateConfig == nil {
s.Spec.UpdateConfig = &swarm.UpdateConfig{}
@@ -687,7 +687,7 @@ func setUpdateOrder(order string) testdaemon.ServiceConstructor {
}
}
func setRollbackOrder(order string) testdaemon.ServiceConstructor {
func setRollbackOrder(order swarm.UpdateOrder) testdaemon.ServiceConstructor {
return func(s *swarm.Service) {
if s.Spec.RollbackConfig == nil {
s.Spec.RollbackConfig = &swarm.UpdateConfig{}