1206 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
2729703967 client: fix example in README (align with ExampleNew())
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-12 20:31:04 +01:00
Sebastiaan van Stijn
b29990916d client: fix unused imports
this was introduced in c950796596, but
likely due to the "replace" rules not being present, CI tested the
current version of the module instead of the code in the repository.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-12 17:53:36 +01:00
Sebastiaan van Stijn
16b95ba758 go.mod: add back replace rules
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-12 15:43:16 +01:00
Sebastiaan van Stijn
c950796596 client: use t.Context in tests
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 23:23:23 +01:00
Paweł Gronowski
e0a877b487 vendor: github.com/moby/moby/api v1.52.0
full diff: https://github.com/moby/moby/api/compare/da8fb63a73c0...v1.52.0

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-10 21:46:26 +01:00
Paweł Gronowski
854ccbfcf5 Drop replace rules
Prepare v29.0.0

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-10 19:38:57 +01:00
Sebastiaan van Stijn
15241265dc client, api: update go.mod to go1.24
While go1.23 still works, it's already EOL, so it may be a better
starting point to use that as minimum version for these modules, as
they're brand new.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 18:42:11 +01:00
Paweł Gronowski
f57da07056 Merge pull request #51454 from thaJeztah/api_volumes_no_pointer
api/types/volume: change ListResponse.Volumes to a non-pointer slice
2025-11-10 16:20:16 +01:00
Rob Murray
69c4524355 Merge pull request #51437 from thaJeztah/diskusage_move_legacy
api: remove / internalize LegacyDiskUsage
2025-11-10 15:03:37 +00:00
Paweł Gronowski
75cf7c2544 Merge pull request #51450 from thaJeztah/checkpoint_client
client: checkpoint: add output structs and fix naming
2025-11-10 13:49:45 +01:00
Sebastiaan van Stijn
18000fe371 api/types/volume: change ListResponse.Volumes to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 13:13:22 +01:00
Sebastiaan van Stijn
7aa036ef2e client: rename CheckpointDelete to CheckpointRemove, and add output struct
Align with other "delete" options, which are all named "remove".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 11:42:27 +01:00
Sebastiaan van Stijn
e2bdc51508 client: CheckpointCreate: add output struct
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 11:42:23 +01:00
Sebastiaan van Stijn
da25838fc3 client: CheckpointListResult: rename Checkpoints to Items
Align with other ListResult structs

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 11:23:34 +01:00
Sebastiaan van Stijn
fda54735c9 client: move CheckpointAPIClient together with other interfaces
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-10 11:19:12 +01:00
Sebastiaan van Stijn
15a048c396 api, client: don't use a pointer-slice for plugins
The backend and router don't use a pointer-slice (the server actually
doesn't use the `plugin.ListResponse` type and a straight slice);
778e5bfad3/daemon/server/router/plugin/backend.go (L20)
6baf274fa3/daemon/server/router/plugin/plugin_routes.go (L276-L280)

Align the type in the API to match, and update the type defined in the
client accordingly.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 21:02:26 +01:00
Sebastiaan van Stijn
ed428234bd api: remove / internalize LegacyDiskUsage
These fields have been removed from the API specification, and the struct
was only needed to produce legacy responses (server), or to unmarshal
legacy responses in the client.

As the API module only provides API definitions for the current API version,
we should remove these legacy structs, and keep them internal to the daemon
and client.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 20:16:03 +01:00
Sebastiaan van Stijn
bd5e6bab1d go.mod: add back replace
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 17:22:05 +01:00
Paweł Gronowski
f66f1b451c vendor: github.com/moby/moby/api v1.52.0-rc.1
full diff: https://github.com/moby/moby/api/compare/v1.52.0-beta.4...v1.52.0-rc.1

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-07 01:11:18 +01:00
Paweł Gronowski
e8745c2157 Drop replace rules
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-11-07 00:56:57 +01:00
Sebastiaan van Stijn
52e19b6e6d Merge pull request #51402 from thaJeztah/cleanup_interfaces
client: cleanup and re-group interfaces
2025-11-07 00:53:54 +01:00
Paweł Gronowski
16b865e7ce Merge pull request #51431 from thaJeztah/client_rm_deprecated
client: remove uses of deprecated NewClientWithOpts
2025-11-07 00:52:56 +01:00
Paweł Gronowski
7fd468cebf Merge pull request #51428 from austinvazquez/rename-api-fields
Rename disk usage API fields
2025-11-07 00:52:46 +01:00
Sebastiaan van Stijn
8db3118ac9 client: remove uses of deprecated NewClientWithOpts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-07 00:07:11 +01:00
Sebastiaan van Stijn
1745075b24 client: DiskUsage: rename fields to match API
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 17:06:53 -06:00
Paweł Gronowski
56463970c0 Merge pull request #51429 from thaJeztah/unexport_streamformatter
client: pkg/streamformatter: un-export unused utilities
2025-11-07 00:05:33 +01:00
Sebastiaan van Stijn
dcfcfd33e9 client: cleanup and re-group interfaces
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 23:48:47 +01:00
Austin Vazquez
931c347b36 api/types: rename disk usage fields
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-06 16:21:32 -06:00
Paweł Gronowski
217fd78905 Merge pull request #51412 from austinvazquez/use-regular-slice-for-disk-usage
api/types: use regular slices for disk usage types
2025-11-06 23:13:47 +01:00
Sebastiaan van Stijn
745c483e42 client: pkg/streamformatter: un-export unused utilities
Un-export or remove utilities that have no (external) users;

- AuxFormatter (not used)
- FormatError (only used internally)
- FormatStatus (only used internally)
- NewJSONProgressOutput (used by CLI)
- NewProgressOutput (used by compose, cli for classic builder)
- NewStderrWriter (not used)
- NewStdoutWriter (not used)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 23:12:11 +01:00
Austin Vazquez
4c6d0ebc40 Fix disk usage result from legacy response logic
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-06 15:12:30 -06:00
Sebastiaan van Stijn
f7fd9c315a Merge pull request #51381 from thaJeztah/simplify_pkg_security
client/pkg/security: simplify
2025-11-06 22:06:08 +01:00
Sebastiaan van Stijn
0029924181 api/types/system: change legacyDiskUsage to a non-pointer slice
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 12:31:05 +01:00
Austin Vazquez
6881ae72c7 api/types: use regular slices for disk usage types
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 22:05:47 -06:00
Sebastiaan van Stijn
f76f1fc013 client: Client.ImageSave: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:10:59 +01:00
Sebastiaan van Stijn
175e4e5048 client: Client.TaskLogs: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:10:54 +01:00
Sebastiaan van Stijn
d35d8ec81b client: Client.ContainerLogs: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:09:33 +01:00
Sebastiaan van Stijn
cc9969bfed client: Client.ServiceLogs: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:08:23 +01:00
Sebastiaan van Stijn
c5aedacb4f client: Client.ContainerExport: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:07:57 +01:00
Sebastiaan van Stijn
08cd02cab6 client: Client.ImageImport: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:07:52 +01:00
Sebastiaan van Stijn
849239cedf client: Client.ImageLoad: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:07:14 +01:00
Sebastiaan van Stijn
be96014740 client: Client.ContainerStats: close reader on context cancellation
Use a cancelReadCloser to automatically close the reader when the context
is cancelled. Consumers are still recommended to manually close the reader,
but the cancelReadCloser makes the Close idempotent.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-06 00:06:16 +01:00
Sebastiaan van Stijn
d11232bad9 client: add newCancelReadCloser utility
Small utility to automatically close an io.ReadCloser when the
context is cancelled, but allowing the caller to close manually
as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 23:17:14 +01:00
Austin Vazquez
5e985ccd90 Merge pull request #51406 from austinvazquez/move-disk-system-usage-types
api/types: move disk usage structs to per type packages
2025-11-05 14:36:03 -06:00
Austin Vazquez
d55d2f738b Merge pull request #51383 from thaJeztah/client_ImageLoad_interface
client: use interface for return types
2025-11-05 11:35:59 -06:00
Austin Vazquez
cc25d0ebd4 Merge pull request #51403 from thaJeztah/singularize_prune
client: singularize prune methods
2025-11-05 11:33:14 -06:00
Austin Vazquez
fabdccbe10 api/types: move disk usage structs to per type packages
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-11-05 11:20:15 -06:00
Sebastiaan van Stijn
689776a4fa Merge pull request #51400 from thaJeztah/client_renames
client: ExecCreate: rename Tty to TTY, change ConsoleSize to a ConsoleSize type
2025-11-05 17:32:53 +01:00
Sebastiaan van Stijn
cdede16ce7 Merge pull request #51399 from thaJeztah/swarm_enums
api/types/swarm: create types for enum-consts
2025-11-05 16:33:20 +01:00
Sebastiaan van Stijn
de9ab07188 client: ExecCreateOptions: change ConsoleSize to a ConsoleSize type
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-05 15:53:28 +01:00