vendor: docker/docker, moby/moby/api and moby/moby/client 25e2b4d48551
notable changes: - api/types/container.StatsResponseReader: move to client - api/types: move backend types to daemon/server - runconfig: remove exported errors full diff: https://github.com/moby/moby/compare/c4afa7715715...25e2b4d48551 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
+3
-3
@@ -8,8 +8,8 @@ go 1.23.0
|
||||
|
||||
replace (
|
||||
// FIXME(thaJeztah): temporarily need to pin on commits, otherwise go modules won't resolve until these are tagged.
|
||||
github.com/moby/moby/api => github.com/moby/moby/api v0.0.0-20250726000215-c4afa7715715
|
||||
github.com/moby/moby/client => github.com/moby/moby/client v0.0.0-20250726000215-c4afa7715715
|
||||
github.com/moby/moby/api => github.com/moby/moby/api v0.0.0-20250728115625-25e2b4d48551
|
||||
github.com/moby/moby/client => github.com/moby/moby/client v0.0.0-20250728115625-25e2b4d48551
|
||||
)
|
||||
|
||||
require (
|
||||
@@ -22,7 +22,7 @@ require (
|
||||
github.com/distribution/reference v0.6.0
|
||||
github.com/docker/cli-docs-tool v0.10.0
|
||||
github.com/docker/distribution v2.8.3+incompatible
|
||||
github.com/docker/docker v28.2.3-0.20250726000215-c4afa7715715+incompatible // master (v29.0-dev)
|
||||
github.com/docker/docker v28.2.3-0.20250728115625-25e2b4d48551+incompatible // master (v29.0-dev)
|
||||
github.com/docker/docker-credential-helpers v0.9.3
|
||||
github.com/docker/go-connections v0.5.0
|
||||
github.com/docker/go-units v0.5.0
|
||||
|
||||
+6
-6
@@ -57,8 +57,8 @@ github.com/docker/cli-docs-tool v0.10.0/go.mod h1:5EM5zPnT2E7yCLERZmrDA234Vwn09f
|
||||
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
|
||||
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
|
||||
github.com/docker/docker v28.2.3-0.20250726000215-c4afa7715715+incompatible h1:68v/T8kOboaoOkQHDoCoECymkwMCjA7kV/JCPuWF1cg=
|
||||
github.com/docker/docker v28.2.3-0.20250726000215-c4afa7715715+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker v28.2.3-0.20250728115625-25e2b4d48551+incompatible h1:RUnyE66iE5e8yy3Wh2+k2dNXYX4gd9IbbectpTDgXT4=
|
||||
github.com/docker/docker v28.2.3-0.20250728115625-25e2b4d48551+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
|
||||
github.com/docker/docker-credential-helpers v0.9.3 h1:gAm/VtF9wgqJMoxzT3Gj5p4AqIjCBS4wrsOh9yRqcz8=
|
||||
github.com/docker/docker-credential-helpers v0.9.3/go.mod h1:x+4Gbw9aGmChi3qTLZj8Dfn0TD20M/fuWy0E5+WDeCo=
|
||||
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
|
||||
@@ -172,10 +172,10 @@ github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3N
|
||||
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
|
||||
github.com/moby/go-archive v0.1.0 h1:Kk/5rdW/g+H8NHdJW2gsXyZ7UnzvJNOy6VKJqueWdcQ=
|
||||
github.com/moby/go-archive v0.1.0/go.mod h1:G9B+YoujNohJmrIYFBpSd54GTUB4lt9S+xVQvsJyFuo=
|
||||
github.com/moby/moby/api v0.0.0-20250726000215-c4afa7715715 h1:UUkLPAPbTOKnuShYw9Qtzp2A8MAqLX0uUcGLMp88ZnI=
|
||||
github.com/moby/moby/api v0.0.0-20250726000215-c4afa7715715/go.mod h1:VA4aMWurxqzKHCXKDSqoBx3hiJxnTStnqSG5zgc8XL0=
|
||||
github.com/moby/moby/client v0.0.0-20250726000215-c4afa7715715 h1:clo9erZs096YQdhoocHEV99JEZ6BXriBXTVvugenHr4=
|
||||
github.com/moby/moby/client v0.0.0-20250726000215-c4afa7715715/go.mod h1:Ax3ccMnrUUuchkrGDgHpXDeoI0g3MCgZy0V0vDo0+qs=
|
||||
github.com/moby/moby/api v0.0.0-20250728115625-25e2b4d48551 h1:IDS0iA6rzTYatXxXv7V+nYx7Xj+GBFiKCGnVcKXQnQk=
|
||||
github.com/moby/moby/api v0.0.0-20250728115625-25e2b4d48551/go.mod h1:VA4aMWurxqzKHCXKDSqoBx3hiJxnTStnqSG5zgc8XL0=
|
||||
github.com/moby/moby/client v0.0.0-20250728115625-25e2b4d48551 h1:4bUlz0Gt8GQxRyi+npSmSSBDjDG7uiXeYYq6qL3Yb9Q=
|
||||
github.com/moby/moby/client v0.0.0-20250728115625-25e2b4d48551/go.mod h1:Ax3ccMnrUUuchkrGDgHpXDeoI0g3MCgZy0V0vDo0+qs=
|
||||
github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk=
|
||||
github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc=
|
||||
github.com/moby/swarmkit/v2 v2.0.0 h1:jkWQKQaJ4ltA61/mC9UdPe1McLma55RUcacTO+pPweY=
|
||||
|
||||
-13
@@ -1,7 +1,6 @@
|
||||
package container
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
@@ -35,18 +34,6 @@ type CopyToContainerOptions struct {
|
||||
CopyUIDGID bool
|
||||
}
|
||||
|
||||
// StatsResponseReader wraps an io.ReadCloser to read (a stream of) stats
|
||||
// for a container, as produced by the GET "/stats" endpoint.
|
||||
//
|
||||
// The OSType field is set to the server's platform to allow
|
||||
// platform-specific handling of the response.
|
||||
//
|
||||
// TODO(thaJeztah): remove this wrapper, and make OSType part of [StatsResponse].
|
||||
type StatsResponseReader struct {
|
||||
Body io.ReadCloser `json:"body"`
|
||||
OSType string `json:"ostype"`
|
||||
}
|
||||
|
||||
// MountPoint represents a mount point configuration inside the container.
|
||||
// This is used for reporting the mountpoints in use by a container.
|
||||
type MountPoint struct {
|
||||
|
||||
+2
-2
@@ -85,8 +85,8 @@ type ContainerAPIClient interface {
|
||||
ContainerResize(ctx context.Context, container string, options container.ResizeOptions) error
|
||||
ContainerRestart(ctx context.Context, container string, options container.StopOptions) error
|
||||
ContainerStatPath(ctx context.Context, container, path string) (container.PathStat, error)
|
||||
ContainerStats(ctx context.Context, container string, stream bool) (container.StatsResponseReader, error)
|
||||
ContainerStatsOneShot(ctx context.Context, container string) (container.StatsResponseReader, error)
|
||||
ContainerStats(ctx context.Context, container string, stream bool) (StatsResponseReader, error)
|
||||
ContainerStatsOneShot(ctx context.Context, container string) (StatsResponseReader, error)
|
||||
ContainerStart(ctx context.Context, container string, options container.StartOptions) error
|
||||
ContainerStop(ctx context.Context, container string, options container.StopOptions) error
|
||||
ContainerTop(ctx context.Context, container string, arguments []string) (container.TopResponse, error)
|
||||
|
||||
+21
-10
@@ -2,17 +2,28 @@ package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/url"
|
||||
|
||||
"github.com/moby/moby/api/types/container"
|
||||
)
|
||||
|
||||
// StatsResponseReader wraps an io.ReadCloser to read (a stream of) stats
|
||||
// for a container, as produced by the GET "/stats" endpoint.
|
||||
//
|
||||
// The OSType field is set to the server's platform to allow
|
||||
// platform-specific handling of the response.
|
||||
//
|
||||
// TODO(thaJeztah): remove this wrapper, and make OSType part of [github.com/moby/moby/api/types/container.StatsResponse].
|
||||
type StatsResponseReader struct {
|
||||
Body io.ReadCloser `json:"body"`
|
||||
OSType string `json:"ostype"`
|
||||
}
|
||||
|
||||
// ContainerStats returns near realtime stats for a given container.
|
||||
// It's up to the caller to close the io.ReadCloser returned.
|
||||
func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (container.StatsResponseReader, error) {
|
||||
func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (StatsResponseReader, error) {
|
||||
containerID, err := trimID("container", containerID)
|
||||
if err != nil {
|
||||
return container.StatsResponseReader{}, err
|
||||
return StatsResponseReader{}, err
|
||||
}
|
||||
|
||||
query := url.Values{}
|
||||
@@ -23,10 +34,10 @@ func (cli *Client) ContainerStats(ctx context.Context, containerID string, strea
|
||||
|
||||
resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil)
|
||||
if err != nil {
|
||||
return container.StatsResponseReader{}, err
|
||||
return StatsResponseReader{}, err
|
||||
}
|
||||
|
||||
return container.StatsResponseReader{
|
||||
return StatsResponseReader{
|
||||
Body: resp.Body,
|
||||
OSType: resp.Header.Get("Ostype"),
|
||||
}, nil
|
||||
@@ -34,10 +45,10 @@ func (cli *Client) ContainerStats(ctx context.Context, containerID string, strea
|
||||
|
||||
// ContainerStatsOneShot gets a single stat entry from a container.
|
||||
// It differs from `ContainerStats` in that the API should not wait to prime the stats
|
||||
func (cli *Client) ContainerStatsOneShot(ctx context.Context, containerID string) (container.StatsResponseReader, error) {
|
||||
func (cli *Client) ContainerStatsOneShot(ctx context.Context, containerID string) (StatsResponseReader, error) {
|
||||
containerID, err := trimID("container", containerID)
|
||||
if err != nil {
|
||||
return container.StatsResponseReader{}, err
|
||||
return StatsResponseReader{}, err
|
||||
}
|
||||
|
||||
query := url.Values{}
|
||||
@@ -46,10 +57,10 @@ func (cli *Client) ContainerStatsOneShot(ctx context.Context, containerID string
|
||||
|
||||
resp, err := cli.get(ctx, "/containers/"+containerID+"/stats", query, nil)
|
||||
if err != nil {
|
||||
return container.StatsResponseReader{}, err
|
||||
return StatsResponseReader{}, err
|
||||
}
|
||||
|
||||
return container.StatsResponseReader{
|
||||
return StatsResponseReader{
|
||||
Body: resp.Body,
|
||||
OSType: resp.Header.Get("Ostype"),
|
||||
}, nil
|
||||
|
||||
Vendored
+5
-5
@@ -65,7 +65,7 @@ github.com/docker/distribution/registry/client/transport
|
||||
github.com/docker/distribution/registry/storage/cache
|
||||
github.com/docker/distribution/registry/storage/cache/memory
|
||||
github.com/docker/distribution/uuid
|
||||
# github.com/docker/docker v28.2.3-0.20250726000215-c4afa7715715+incompatible
|
||||
# github.com/docker/docker v28.2.3-0.20250728115625-25e2b4d48551+incompatible
|
||||
## explicit
|
||||
github.com/docker/docker/pkg/jsonmessage
|
||||
github.com/docker/docker/pkg/process
|
||||
@@ -174,7 +174,7 @@ github.com/moby/docker-image-spec/specs-go/v1
|
||||
github.com/moby/go-archive
|
||||
github.com/moby/go-archive/compression
|
||||
github.com/moby/go-archive/tarheader
|
||||
# github.com/moby/moby/api v0.0.0 => github.com/moby/moby/api v0.0.0-20250726000215-c4afa7715715
|
||||
# github.com/moby/moby/api v0.0.0 => github.com/moby/moby/api v0.0.0-20250728115625-25e2b4d48551
|
||||
## explicit; go 1.23.0
|
||||
github.com/moby/moby/api/stdcopy
|
||||
github.com/moby/moby/api/types
|
||||
@@ -198,7 +198,7 @@ github.com/moby/moby/api/types/system
|
||||
github.com/moby/moby/api/types/time
|
||||
github.com/moby/moby/api/types/versions
|
||||
github.com/moby/moby/api/types/volume
|
||||
# github.com/moby/moby/client v0.0.0 => github.com/moby/moby/client v0.0.0-20250726000215-c4afa7715715
|
||||
# github.com/moby/moby/client v0.0.0 => github.com/moby/moby/client v0.0.0-20250728115625-25e2b4d48551
|
||||
## explicit; go 1.23.0
|
||||
github.com/moby/moby/client
|
||||
github.com/moby/moby/client/pkg/stringid
|
||||
@@ -572,5 +572,5 @@ gotest.tools/v3/skip
|
||||
# tags.cncf.io/container-device-interface v0.8.0
|
||||
## explicit; go 1.20
|
||||
tags.cncf.io/container-device-interface/pkg/parser
|
||||
# github.com/moby/moby/api => github.com/moby/moby/api v0.0.0-20250726000215-c4afa7715715
|
||||
# github.com/moby/moby/client => github.com/moby/moby/client v0.0.0-20250726000215-c4afa7715715
|
||||
# github.com/moby/moby/api => github.com/moby/moby/api v0.0.0-20250728115625-25e2b4d48551
|
||||
# github.com/moby/moby/client => github.com/moby/moby/client v0.0.0-20250728115625-25e2b4d48551
|
||||
|
||||
Reference in New Issue
Block a user