mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 11:03:34 +00:00
feat(images): gRPC client and server for ListImages
This commit is contained in:
@@ -3,6 +3,7 @@ package api
|
||||
import (
|
||||
"github.com/distribution/reference"
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/image"
|
||||
v1 "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/psviderski/uncloud/internal/machine/api/pb"
|
||||
)
|
||||
@@ -12,6 +13,23 @@ type MachineImage struct {
|
||||
Image types.ImageInspect
|
||||
}
|
||||
|
||||
// MachineImages represents images present on a particular machine.
|
||||
type MachineImages struct {
|
||||
Metadata *pb.Metadata
|
||||
// DockerImages is a list of images present in the Docker internal image store.
|
||||
// It may be empty if Docker uses the containerd image store directly (containerd-snapshotter feature).
|
||||
DockerImages []image.Summary
|
||||
// ContainerdImages is a list of images present in the containerd image store.
|
||||
ContainerdImages []image.Summary
|
||||
}
|
||||
|
||||
// ImageFilter defines criteria to filter images in ListImages.
|
||||
type ImageFilter struct {
|
||||
// Machines filters images to those present on the specified machines (names or IDs).
|
||||
// If empty, it matches images on all machines.
|
||||
Machines []string
|
||||
}
|
||||
|
||||
// MachineRemoteImage represents an image in a remote registry fetched by a particular machine.
|
||||
type MachineRemoteImage struct {
|
||||
Metadata *pb.Metadata
|
||||
|
||||
Reference in New Issue
Block a user