api/types: move backend types to daemon/server

The "backend" types in API were designed to decouple the API server
implementation from the daemon, or other parts of the code that
back the API server. This would allow the daemon to evolve (e.g.
functionality moved to different subsystems) without that impacting
the API server's implementation.

Now that the API server is no longer part of the API package (module),
there is no benefit to having it in the API module. The API server
may evolve (and require changes in the backend), which has no direct
relation with the API module (types, responses); the backend definition
is, however, coupled to the API server implementation.

It's worth noting that, while "technically" possible to use the API
server package, and implement an alternative backend implementation,
this has never been a prime objective. The backend definition was
never considered "stable", and we don't expect external users to
(attempt) to use it as such.

This patch moves the backend types to the daemon/server package,
so that they can evolve with the daemon and API server implementation
without that impacting the API module (which we intend to be stable,
following SemVer).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-07-28 00:03:04 +02:00
parent c4afa77157
commit 83510a26b3
98 changed files with 91 additions and 349 deletions

View File

@@ -9,9 +9,9 @@ import (
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/stream"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/stdcopy"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/term"

View File

@@ -11,7 +11,7 @@ import (
buildkit "github.com/docker/docker/daemon/internal/builder-next"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/events"
"github.com/pkg/errors"

View File

@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -13,11 +13,11 @@ import (
"github.com/docker/docker/daemon/builder"
"github.com/docker/docker/daemon/builder/remotecontext"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/buildkit/frontend/dockerfile/instructions"
"github.com/moby/buildkit/frontend/dockerfile/parser"
"github.com/moby/buildkit/frontend/dockerfile/shell"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"github.com/moby/sys/user"

View File

@@ -9,7 +9,7 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/builder"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
"github.com/pkg/errors"
)

View File

@@ -11,11 +11,11 @@ import (
"github.com/docker/docker/daemon/builder"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/pkg/oci"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/go-connections/nat"
"github.com/moby/buildkit/frontend/dockerfile/instructions"
"github.com/moby/buildkit/frontend/dockerfile/parser"
"github.com/moby/buildkit/frontend/dockerfile/shell"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"gotest.tools/v3/assert"

View File

@@ -8,7 +8,7 @@ import (
"github.com/containerd/platforms"
"github.com/docker/docker/daemon/builder"
dockerimage "github.com/docker/docker/daemon/internal/image"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
)

View File

@@ -16,10 +16,10 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/stringid"
networkSettings "github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/go-connections/nat"
"github.com/moby/go-archive"
"github.com/moby/go-archive/chrootarchive"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/network"

View File

@@ -11,9 +11,9 @@ import (
"github.com/docker/docker/daemon/builder/remotecontext"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/go-connections/nat"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"github.com/opencontainers/go-digest"

View File

@@ -9,7 +9,7 @@ import (
"github.com/docker/docker/daemon/builder"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -14,9 +14,9 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/builder"
"github.com/docker/docker/daemon/builder/remotecontext/urlutil"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/buildkit/frontend/dockerfile/parser"
"github.com/moby/moby/api/types/backend"
"github.com/moby/patternmatcher"
"github.com/moby/patternmatcher/ignorefile"
"github.com/moby/sys/symlink"

View File

@@ -10,9 +10,9 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/pkg/plugin"
v2 "github.com/docker/docker/daemon/pkg/plugin/v2"
"github.com/docker/docker/daemon/server/backend"
"github.com/gogo/protobuf/proto"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/registry"
"github.com/moby/moby/api/types/swarm/runtime"
"github.com/moby/swarmkit/v2/api"

View File

@@ -13,8 +13,8 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/pkg/plugin"
v2 "github.com/docker/docker/daemon/pkg/plugin/v2"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/registry"
"github.com/moby/moby/api/types/swarm/runtime"
"github.com/moby/pubsub"

View File

@@ -14,8 +14,8 @@ import (
networktypes "github.com/docker/docker/daemon/libnetwork/types"
networkSettings "github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/pkg/plugin"
"github.com/docker/docker/daemon/server/backend"
volumeopts "github.com/docker/docker/daemon/volume/service/opts"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"

View File

@@ -18,9 +18,9 @@ import (
executorpkg "github.com/docker/docker/daemon/cluster/executor"
"github.com/docker/docker/daemon/libnetwork"
networkSettings "github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/server/backend"
volumeopts "github.com/docker/docker/daemon/volume/service/opts"
gogotypes "github.com/gogo/protobuf/types"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/network"

View File

@@ -14,9 +14,9 @@ import (
"github.com/containerd/log"
"github.com/distribution/reference"
"github.com/docker/docker/daemon/cluster/convert"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
gogotypes "github.com/gogo/protobuf/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/registry"
"github.com/moby/moby/api/types/swarm"

View File

@@ -10,9 +10,9 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/cluster/convert"
"github.com/docker/docker/daemon/pkg/opts"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/stack"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/filters"
types "github.com/moby/moby/api/types/swarm"

View File

@@ -10,8 +10,8 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/builder/dockerfile"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/pkg/errors"

View File

@@ -14,8 +14,8 @@ import (
"github.com/docker/docker/daemon/internal/image/cache"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/internal/multierror"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -14,9 +14,9 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/images"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
imagespec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/moby/moby/api/types/backend"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"

View File

@@ -25,12 +25,12 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
imagespec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/registry"

View File

@@ -17,9 +17,9 @@ import (
cerrdefs "github.com/containerd/errdefs"
"github.com/containerd/log"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/server/backend"
imagespec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types/backend"
"github.com/opencontainers/go-digest"
"github.com/opencontainers/image-spec/identity"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -4,7 +4,7 @@ import (
"context"
c8dimages "github.com/containerd/containerd/v2/core/images"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/events"
)

View File

@@ -14,8 +14,8 @@ import (
"github.com/containerd/platforms"
"github.com/distribution/reference"
"github.com/docker/docker/daemon/internal/sliceutil"
"github.com/docker/docker/daemon/server/backend"
imagespec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/moby/moby/api/types/backend"
imagetypes "github.com/moby/moby/api/types/image"
"github.com/moby/moby/api/types/storage"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -9,8 +9,8 @@ import (
c8dimages "github.com/containerd/containerd/v2/core/images"
"github.com/containerd/containerd/v2/pkg/namespaces"
"github.com/containerd/log/logtest"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/internal/testutils/specialimage"
"github.com/moby/moby/api/types/backend"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

View File

@@ -16,10 +16,10 @@ import (
"github.com/containerd/log"
"github.com/containerd/platforms"
"github.com/distribution/reference"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/buildkit/util/attestation"
dockerspec "github.com/moby/docker-image-spec/specs-go/v1"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
imagetypes "github.com/moby/moby/api/types/image"
timetypes "github.com/moby/moby/api/types/time"

View File

@@ -14,10 +14,10 @@ import (
"github.com/containerd/containerd/v2/plugins/content/local"
cerrdefs "github.com/containerd/errdefs"
"github.com/containerd/platforms"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/internal/testutils/labelstore"
"github.com/docker/docker/internal/testutils/specialimage"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/image"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"gotest.tools/v3/assert"

View File

@@ -21,9 +21,9 @@ import (
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/internal/multierror"
"github.com/docker/docker/daemon/internal/otelutil"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/runconfig"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
networktypes "github.com/moby/moby/api/types/network"

View File

@@ -57,6 +57,7 @@ import (
"github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/pkg/plugin"
"github.com/docker/docker/daemon/pkg/registry"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/snapshotter"
"github.com/docker/docker/daemon/stats"
volumesservice "github.com/docker/docker/daemon/volume/service"
@@ -68,7 +69,6 @@ import (
"github.com/moby/buildkit/util/grpcerrors"
"github.com/moby/buildkit/util/tracing"
"github.com/moby/locker"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
imagetypes "github.com/moby/moby/api/types/image"
networktypes "github.com/moby/moby/api/types/network"

View File

@@ -13,8 +13,8 @@ import (
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/containerfs"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/opencontainers/selinux/go-selinux"

View File

@@ -8,7 +8,7 @@ import (
cerrdefs "github.com/containerd/errdefs"
"github.com/docker/docker/daemon/container"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
containertypes "github.com/moby/moby/api/types/container"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

View File

@@ -4,7 +4,7 @@ import (
"context"
"fmt"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/image"

View File

@@ -13,9 +13,9 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/stream"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/pools"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/sys/signal"

View File

@@ -11,7 +11,7 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
)

View File

@@ -10,8 +10,8 @@ import (
"github.com/docker/docker/daemon/images"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"
imagetype "github.com/moby/moby/api/types/image"

View File

@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/image/cache"
"github.com/docker/docker/daemon/internal/layer"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
)
type cacheAdaptor struct {

View File

@@ -14,8 +14,8 @@ import (
"github.com/containerd/platforms"
"github.com/distribution/reference"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"

View File

@@ -13,9 +13,9 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/registry"
"github.com/opencontainers/go-digest"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -7,8 +7,8 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/ioutils"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
"github.com/pkg/errors"
)

View File

@@ -11,8 +11,8 @@ import (
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
imagetypes "github.com/moby/moby/api/types/image"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"

View File

@@ -3,7 +3,7 @@ package images
import (
"context"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/events"
)

View File

@@ -8,7 +8,7 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/image"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

View File

@@ -7,7 +7,7 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
imagetypes "github.com/moby/moby/api/types/image"
"github.com/moby/moby/api/types/storage"
)

View File

@@ -11,7 +11,7 @@ import (
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/layer"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
imagetypes "github.com/moby/moby/api/types/image"
timetypes "github.com/moby/moby/api/types/time"
)

View File

@@ -13,9 +13,9 @@ import (
"github.com/docker/docker/daemon/internal/distribution"
progressutils "github.com/docker/docker/daemon/internal/distribution/utils"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/registry"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"

View File

@@ -10,8 +10,8 @@ import (
"github.com/docker/docker/daemon/internal/distribution"
progressutils "github.com/docker/docker/daemon/internal/distribution/utils"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/progress"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/registry"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

View File

@@ -12,9 +12,9 @@ import (
"github.com/docker/docker/daemon/config"
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/go-connections/nat"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
networktypes "github.com/moby/moby/api/types/network"
)

View File

@@ -2,7 +2,7 @@ package daemon
import (
containerpkg "github.com/docker/docker/daemon/container"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
)

View File

@@ -2,7 +2,7 @@ package daemon
import (
containerpkg "github.com/docker/docker/daemon/container"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
)

View File

@@ -20,6 +20,7 @@ import (
"github.com/docker/docker/daemon/internal/builder-next/exporter/overrides"
"github.com/docker/docker/daemon/libnetwork"
"github.com/docker/docker/daemon/pkg/opts"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/streamformatter"
controlapi "github.com/moby/buildkit/api/services/control"
@@ -29,7 +30,6 @@ import (
"github.com/moby/buildkit/session"
"github.com/moby/buildkit/util/entitlements"
"github.com/moby/buildkit/util/tracing"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/network"

View File

@@ -13,9 +13,9 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/go-connections/nat"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/filters"
"github.com/pkg/errors"

View File

@@ -9,7 +9,7 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/internal/stringid"
types "github.com/moby/moby/api/types/backend"
types "github.com/docker/docker/daemon/server/backend"
)
const (

View File

@@ -12,7 +12,7 @@ import (
"github.com/coreos/go-systemd/v22/journal"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/journald/internal/sdjournal"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
)
const (

View File

@@ -8,8 +8,8 @@ import (
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/jsonfilelog/jsonlog"
"github.com/docker/docker/daemon/logger/loggerutils"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/tailfile"
"github.com/moby/moby/api/types/backend"
)
var _ logger.LogReader = (*JSONFileLogger)(nil)

View File

@@ -10,9 +10,9 @@ import (
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/loggerutils"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/go-units"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/plugins/logdriver"
"github.com/pkg/errors"
)

View File

@@ -12,8 +12,8 @@ import (
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/logger/loggertest"
"github.com/docker/docker/daemon/server/backend"
protoio "github.com/gogo/protobuf/io"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/plugins/logdriver"
"gotest.tools/v3/assert"
is "gotest.tools/v3/assert/cmp"

View File

@@ -12,7 +12,7 @@ import (
"sync"
"time"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
)
// ErrReadLogsNotSupported is returned when the underlying log driver does not support reading

View File

@@ -1,7 +1,7 @@
package logger
import (
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
)
func (m *Message) copy() *Message {

View File

@@ -16,7 +16,7 @@ import (
"gotest.tools/v3/assert/opt"
"github.com/docker/docker/daemon/logger"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
)
type syncer interface {

View File

@@ -11,8 +11,8 @@ import (
"time"
"github.com/docker/docker/daemon/logger"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/tailfile"
"github.com/moby/moby/api/types/backend"
"golang.org/x/sync/errgroup"
"gotest.tools/v3/assert"
)

View File

@@ -11,8 +11,8 @@ import (
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/logger"
logcache "github.com/docker/docker/daemon/logger/loggerutils/cache"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
timetypes "github.com/moby/moby/api/types/time"
"github.com/pkg/errors"

View File

@@ -10,7 +10,7 @@ import (
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/internal/multierror"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pkg/errors"
)

View File

@@ -13,7 +13,7 @@ import (
libcontainerdtypes "github.com/docker/docker/daemon/internal/libcontainerd/types"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/internal/restartmanager"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/events"
"github.com/pkg/errors"
)

View File

@@ -25,10 +25,10 @@ import (
lntypes "github.com/docker/docker/daemon/libnetwork/types"
"github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/pkg/opts"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/plugingetter"
"github.com/docker/go-connections/nat"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"

View File

@@ -16,8 +16,8 @@ import (
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/pkg/oci"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/pkg/errors"

View File

@@ -24,6 +24,7 @@ import (
"github.com/docker/docker/daemon/internal/containerfs"
"github.com/docker/docker/daemon/internal/stringid"
v2 "github.com/docker/docker/daemon/pkg/plugin/v2"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/authorization"
@@ -31,7 +32,6 @@ import (
"github.com/docker/docker/pkg/progress"
"github.com/moby/go-archive/chrootarchive"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/registry"

View File

@@ -9,8 +9,8 @@ import (
"net/http"
"github.com/distribution/reference"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/registry"
)

View File

@@ -11,8 +11,8 @@ import (
"github.com/docker/docker/daemon/internal/containerfs"
"github.com/docker/docker/daemon/internal/stringid"
v2 "github.com/docker/docker/daemon/pkg/plugin/v2"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
"github.com/moby/sys/mount"
"github.com/moby/sys/mountinfo"

View File

@@ -8,8 +8,8 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/internal/lazyregexp"
"github.com/docker/docker/daemon/libnetwork"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"

View File

@@ -8,10 +8,10 @@ import (
"net/url"
"sort"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/moby/moby/api/stdcopy"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
)

View File

@@ -3,7 +3,7 @@ package build
import (
"context"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/build"
)

View File

@@ -16,11 +16,11 @@ import (
"syscall"
"github.com/containerd/log"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/filters"

View File

@@ -4,8 +4,8 @@ import (
"context"
"io"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/filters"
)

View File

@@ -14,13 +14,13 @@ import (
"github.com/containerd/platforms"
"github.com/docker/docker/daemon/libnetwork/netlabel"
networkSettings "github.com/docker/docker/daemon/network"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httpstatus"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/runconfig"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/mount"

View File

@@ -7,11 +7,11 @@ import (
"net/http"
"github.com/containerd/log"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/stdcopy"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/versions"
"github.com/pkg/errors"

View File

@@ -9,8 +9,8 @@ import (
"github.com/docker/docker/daemon/internal/sliceutil"
"github.com/docker/docker/daemon/internal/stringid"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/versions"
)

View File

@@ -6,7 +6,7 @@ import (
"github.com/distribution/reference"
dockerimage "github.com/docker/docker/daemon/internal/image"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/image"
"github.com/moby/moby/api/types/registry"

View File

@@ -14,13 +14,13 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/builder/remotecontext"
"github.com/docker/docker/daemon/internal/image"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/errdefs"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
imagetypes "github.com/moby/moby/api/types/image"
"github.com/moby/moby/api/types/registry"

View File

@@ -3,7 +3,7 @@ package network
import (
"context"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/network"
)

View File

@@ -8,9 +8,9 @@ import (
"github.com/docker/docker/daemon/libnetwork"
"github.com/docker/docker/daemon/libnetwork/scope"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/network"
"github.com/moby/moby/api/types/versions"

View File

@@ -7,8 +7,8 @@ import (
"github.com/distribution/reference"
"github.com/docker/docker/daemon/pkg/plugin"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/registry"
)

View File

@@ -7,11 +7,11 @@ import (
"strings"
"github.com/distribution/reference"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/streamformatter"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/registry"
"github.com/pkg/errors"

View File

@@ -3,7 +3,7 @@ package swarm
import (
"context"
"github.com/moby/moby/api/types/backend"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/swarm"
)

View File

@@ -7,9 +7,9 @@ import (
"strconv"
"github.com/containerd/log"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/filters"
"github.com/moby/moby/api/types/registry"
types "github.com/moby/moby/api/types/swarm"

View File

@@ -5,9 +5,9 @@ import (
"errors"
"net/http"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
basictypes "github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/swarm"
"github.com/moby/moby/api/types/versions"

View File

@@ -4,8 +4,8 @@ import (
"context"
"time"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"

View File

@@ -11,10 +11,10 @@ import (
"time"
"github.com/containerd/log"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/server/httputils"
"github.com/docker/docker/daemon/server/router/build"
"github.com/docker/docker/pkg/ioutils"
"github.com/moby/moby/api/types/backend"
buildtypes "github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/filters"

View File

@@ -12,8 +12,8 @@ import (
"github.com/docker/docker/daemon/internal/libcontainerd"
"github.com/docker/docker/daemon/internal/metrics"
"github.com/docker/docker/daemon/internal/otelutil"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
"github.com/pkg/errors"
"go.opentelemetry.io/otel"

View File

@@ -9,8 +9,8 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
)

View File

@@ -12,12 +12,12 @@ import (
"github.com/containerd/log"
"github.com/docker/docker/daemon/container"
"github.com/docker/docker/daemon/internal/layer"
"github.com/docker/docker/daemon/server/backend"
"github.com/docker/docker/daemon/volume"
volumemounts "github.com/docker/docker/daemon/volume/mounts"
"github.com/docker/docker/daemon/volume/service"
volumeopts "github.com/docker/docker/daemon/volume/service/opts"
"github.com/docker/docker/errdefs"
"github.com/moby/moby/api/types/backend"
containertypes "github.com/moby/moby/api/types/container"
mounttypes "github.com/moby/moby/api/types/mount"
volumetypes "github.com/moby/moby/api/types/volume"

View File

@@ -11,9 +11,9 @@ import (
"github.com/docker/docker/daemon/pkg/plugin"
registrypkg "github.com/docker/docker/daemon/pkg/registry"
"github.com/docker/docker/daemon/server/backend"
"github.com/moby/go-archive"
"github.com/moby/moby/api/types"
"github.com/moby/moby/api/types/backend"
"github.com/moby/moby/api/types/events"
"github.com/moby/moby/api/types/registry"
"github.com/moby/moby/client"

View File

@@ -1,178 +0,0 @@
// Package backend includes types to send information to server backends.
package backend
import (
"io"
"time"
"github.com/distribution/reference"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/network"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
// ContainerCreateConfig is the parameter set to ContainerCreate()
type ContainerCreateConfig struct {
Name string
Config *container.Config
HostConfig *container.HostConfig
NetworkingConfig *network.NetworkingConfig
Platform *ocispec.Platform
DefaultReadOnlyNonRecursive bool
}
// ContainerRmConfig holds arguments for the container remove
// operation. This struct is used to tell the backend what operations
// to perform.
type ContainerRmConfig struct {
ForceRemove, RemoveVolume, RemoveLink bool
}
// ContainerAttachConfig holds the streams to use when connecting to a container to view logs.
type ContainerAttachConfig struct {
GetStreams func(multiplexed bool, cancel func()) (io.ReadCloser, io.Writer, io.Writer, error)
UseStdin bool
UseStdout bool
UseStderr bool
Logs bool
Stream bool
DetachKeys string
// Used to signify that streams must be multiplexed by producer as endpoint can't manage multiple streams.
// This is typically set by HTTP endpoint, while websocket can transport raw streams
MuxStreams bool
}
// PartialLogMetaData provides meta data for a partial log message. Messages
// exceeding a predefined size are split into chunks with this metadata. The
// expectation is for the logger endpoints to assemble the chunks using this
// metadata.
type PartialLogMetaData struct {
Last bool // true if this message is last of a partial
ID string // identifies group of messages comprising a single record
Ordinal int // ordering of message in partial group
}
// LogMessage is datastructure that represents piece of output produced by some
// container. The Line member is a slice of an array whose contents can be
// changed after a log driver's Log() method returns.
type LogMessage struct {
Line []byte
Source string
Timestamp time.Time
Attrs []LogAttr
PLogMetaData *PartialLogMetaData
// Err is an error associated with a message. Completeness of a message
// with Err is not expected, tho it may be partially complete (fields may
// be missing, gibberish, or nil)
Err error
}
// LogAttr is used to hold the extra attributes available in the log message.
type LogAttr struct {
Key string
Value string
}
// LogSelector is a list of services and tasks that should be returned as part
// of a log stream. It is similar to swarmapi.LogSelector, with the difference
// that the names don't have to be resolved to IDs; this is mostly to avoid
// accidents later where a swarmapi LogSelector might have been incorrectly
// used verbatim (and to avoid the handler having to import swarmapi types)
type LogSelector struct {
Services []string
Tasks []string
}
// ContainerStatsConfig holds information for configuring the runtime
// behavior of a backend.ContainerStats() call.
type ContainerStatsConfig struct {
Stream bool
OneShot bool
OutStream func() io.Writer
}
// ContainerInspectOptions defines options for the backend.ContainerInspect
// call.
type ContainerInspectOptions struct {
// Size controls whether to propagate the container's size fields.
Size bool
}
// ExecStartConfig holds the options to start container's exec.
type ExecStartConfig struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
ConsoleSize *[2]uint `json:",omitempty"`
}
// ExecInspect holds information about a running process started
// with docker exec.
type ExecInspect = container.ExecInspectResponse
// ExecProcessConfig holds information about the exec process
// running on the host.
type ExecProcessConfig = container.ExecProcessConfig
// CreateImageConfig is the configuration for creating an image from a
// container.
type CreateImageConfig struct {
Tag reference.NamedTagged
Pause bool
Author string
Comment string
Config *container.Config
Changes []string
}
// GetImageOpts holds parameters to retrieve image information
// from the backend.
type GetImageOpts struct {
Platform *ocispec.Platform
}
// ImageInspectOpts holds parameters to inspect an image.
type ImageInspectOpts struct {
Manifests bool
Platform *ocispec.Platform
}
// CommitConfig is the configuration for creating an image as part of a build.
type CommitConfig struct {
Author string
Comment string
Config *container.Config // TODO(thaJeztah); change this to [dockerspec.DockerOCIImageConfig]
ContainerConfig *container.Config
ContainerID string
ContainerMountLabel string
ContainerOS string
ParentImageID string
}
// PluginCreateConfig hold all options to plugin create.
type PluginCreateConfig struct {
RepoName string
}
// PluginRmConfig holds arguments for plugin remove.
type PluginRmConfig struct {
ForceRemove bool
}
// PluginEnableConfig holds arguments for plugin enable
type PluginEnableConfig struct {
Timeout int
}
// PluginDisableConfig holds arguments for plugin disable.
type PluginDisableConfig struct {
ForceDisable bool
}
// NetworkListConfig stores the options available for listing networks
type NetworkListConfig struct {
// TODO(@cpuguy83): naming is hard, this is pulled from what was being used in the router before moving here
Detailed bool
Verbose bool
}

View File

@@ -1,50 +0,0 @@
package backend
import (
"io"
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/registry"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)
// PullOption defines different modes for accessing images
type PullOption int
const (
// PullOptionNoPull only returns local images
PullOptionNoPull PullOption = iota
// PullOptionForcePull always tries to pull a ref from the registry first
PullOptionForcePull
// PullOptionPreferLocal uses local image if it exists, otherwise pulls
PullOptionPreferLocal
)
// ProgressWriter is a data object to transport progress streams to the client
type ProgressWriter struct {
Output io.Writer
StdoutFormatter io.Writer
StderrFormatter io.Writer
AuxFormatter AuxEmitter
ProgressReaderFunc func(io.ReadCloser) io.ReadCloser
}
// AuxEmitter is an interface for emitting aux messages during build progress
type AuxEmitter interface {
Emit(string, interface{}) error
}
// BuildConfig is the configuration used by a BuildManager to start a build
type BuildConfig struct {
Source io.ReadCloser
ProgressWriter ProgressWriter
Options *build.ImageBuildOptions
}
// GetImageAndLayerOptions are the options supported by GetImageAndReleasableLayer
type GetImageAndLayerOptions struct {
PullOption PullOption
AuthConfig map[string]registry.AuthConfig
Output io.Writer
Platform *ocispec.Platform
}

View File

@@ -1,29 +0,0 @@
package backend
import (
"github.com/moby/moby/api/types/build"
"github.com/moby/moby/api/types/container"
"github.com/moby/moby/api/types/image"
"github.com/moby/moby/api/types/volume"
)
// DiskUsageOptions holds parameters for system disk usage query.
type DiskUsageOptions struct {
// Containers controls whether container disk usage should be computed.
Containers bool
// Images controls whether image disk usage should be computed.
Images bool
// Volumes controls whether volume disk usage should be computed.
Volumes bool
}
// DiskUsage contains the information returned by the backend for the
// GET "/system/df" endpoint.
type DiskUsage struct {
Images *image.DiskUsage
Containers *container.DiskUsage
Volumes *volume.DiskUsage
BuildCache *build.CacheDiskUsage
}

1
vendor/modules.txt vendored
View File

@@ -942,7 +942,6 @@ github.com/moby/moby/api
github.com/moby/moby/api/stdcopy
github.com/moby/moby/api/types
github.com/moby/moby/api/types/auxprogress
github.com/moby/moby/api/types/backend
github.com/moby/moby/api/types/blkiodev
github.com/moby/moby/api/types/build
github.com/moby/moby/api/types/checkpoint