DockerCLI/cli/command/stack/swarm
Sebastiaan van Stijn 7405ac5c2d
Services: use ServiceStatus on API v1.41 and up
API v1.41 adds a new option to get the number of desired
and running tasks when listing services. This patch enables
this functionality, and provides a fallback mechanism when
the ServiceStatus is not available, which would be when
using an older API version.

Now that the swarm.Service struct captures this information,
the `ListInfo` type is no longer needed, so it is removed,
and the related list- and formatting functions have been
modified accordingly.

To reduce repetition, sorting the services has been moved
to the formatter. This is a slight change in behavior, but
all calls to the formatter performed this sort first, so
the change will not lead to user-facing changes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-29 15:49:28 +01:00
..
testdata Refactor stack command 2017-12-26 11:45:56 +01:00
client_test.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
common.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
deploy.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
deploy_bundlefile.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
deploy_bundlefile_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
deploy_composefile.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
deploy_composefile_test.go Update tests to use gotest.tools 👼 2018-06-08 18:24:26 +02:00
deploy_test.go gofmt with go-1.11 2018-10-11 01:54:38 -07:00
list.go formatter package heavy refactoring 2018-10-23 17:05:44 +02:00
ps.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
remove.go Refactor `stack` command/package 2018-06-26 14:07:26 +02:00
services.go Services: use ServiceStatus on API v1.41 and up 2019-10-29 15:49:28 +01:00