12 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
3a43b5b559 client: refactor ServiceCreate, ServiceUpdate, SwarmUpdate
Put the version and spec in the options-struct, as we did for other
swarm-related methods.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-10-23 15:40:18 +02:00
Austin Vazquez
612342198c client: refactor swarm api functions to wrap params/responses
Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-10-21 10:17:04 -05:00
Austin Vazquez
4dcc7af116 api/types/swarm: move UpdateFlags type to client
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-26 07:21:23 -05:00
Sebastiaan van Stijn
1c34ff94bc client: consistently use defer for ensureReaderClosed
ensureReaderClosed was designed to be usable regardless if a response
was nil (error) or non-nil (success). Some code-paths were optimized to
avoid using a defer (which used to have an overhead), but the overhead
of defer is neglectable in current versions of Go, and some of these
optimizations made the logic more complicated (and err-prone).

This patch switches to use a defer for all places.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-13 01:17:32 +02:00
Derek McGowan
afd6487b2e Create github.com/moby/moby/api module
Signed-off-by: Derek McGowan <derek@mcg.dev>
2025-07-21 09:30:05 -07:00
Sebastiaan van Stijn
4856e8ffad client: remove // import comments
These comments were added to enforce using the correct import path for
our packages ("github.com/docker/docker", not "github.com/moby/moby").
However, when working in go module mode (not GOPATH / vendor), they have
no effect, so their impact is limited.

Remove these imports in preparation of migrating our code to become an
actual go module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-30 15:59:10 +02:00
Sebastiaan van Stijn
d9524d92a9 api/types/swarm: Version: implement stringer interface
makes the code a bit more DRY.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-13 02:40:14 +02:00
Kir Kolyshkin
7d62e40f7e Switch from x/net/context -> context
Since Go 1.7, context is a standard package. Since Go 1.9, everything
that is provided by "x/net/context" is a couple of type aliases to
types in "context".

Many vendored packages still use x/net/context, so vendor entry remains
for now.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2018-04-23 13:52:44 -07:00
Daniel Nephin
4f0d95fa6e Add canonical import comment
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-02-05 16:51:57 -05:00
yuexiao-wang
113cae5ba2 Change tls to TLS
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-20 22:08:07 +08:00
Aaron Lehmann
a6030a50c9 Add unlock key rotation
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-09 16:09:01 -08:00
Michael Crosby
7c36a1af03 Move engine-api client package
This moves the engine-api client package to `/docker/docker/client`.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2016-09-07 11:05:58 -07:00