mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Add image-related methods to Runtime interface.
This includes RemoveImage() and ListImages().
This commit is contained in:
parent
9fd8cbae64
commit
4d09b79529
@ -74,6 +74,10 @@ type Runtime interface {
|
||||
PullImage(image string) error
|
||||
// IsImagePresent checks whether the container image is already in the local storage.
|
||||
IsImagePresent(image string) (bool, error)
|
||||
// Gets all images currently on the machine.
|
||||
ListImages() ([]Image, error)
|
||||
// Removes the specified image.
|
||||
RemoveImage(image string) error
|
||||
// GetContainerLogs returns logs of a specific container. By
|
||||
// default, it returns a snapshot of the container log. Set 'follow' to true to
|
||||
// stream the log. Set 'follow' to false and specify the number of lines (e.g.
|
||||
@ -154,6 +158,16 @@ type Container struct {
|
||||
Created int64
|
||||
}
|
||||
|
||||
// Basic information about a container image.
|
||||
type Image struct {
|
||||
// ID of the image.
|
||||
ID string
|
||||
// Other names by which this image is known.
|
||||
Tags []string
|
||||
// The size of the image in bytes.
|
||||
Size int64
|
||||
}
|
||||
|
||||
// RunContainerOptions specify the options which are necessary for running containers
|
||||
type RunContainerOptions struct {
|
||||
// The environment variables, they are in the form of 'key=value'.
|
||||
|
Loading…
Reference in New Issue
Block a user