summaryrefslogtreecommitdiff
path: root/cmd/podman/varlink/io.podman.varlink
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/varlink/io.podman.varlink')
-rw-r--r--cmd/podman/varlink/io.podman.varlink57
1 files changed, 49 insertions, 8 deletions
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink
index 618af3481..ad2de56f8 100644
--- a/cmd/podman/varlink/io.podman.varlink
+++ b/cmd/podman/varlink/io.podman.varlink
@@ -19,6 +19,14 @@ type StringResponse (
message: string
)
+type LogLine (
+ device: string,
+ parseLogType : string,
+ time: string,
+ msg: string,
+ cid: string
+)
+
# ContainerChanges describes the return struct for ListContainerChanges
type ContainerChanges (
changed: []string,
@@ -435,6 +443,23 @@ type Runlabel(
opts: [string]string
)
+# Event describes a libpod struct
+type Event(
+ # TODO: make status and type a enum at some point?
+ # id is the container, volume, pod, image ID
+ id: string,
+ # image is the image name where applicable
+ image: string,
+ # name is the name of the pod, container, image
+ name: string,
+ # status describes the event that happened (i.e. create, remove, ...)
+ status: string,
+ # time the event happened
+ time: string,
+ # type describes object the event happened with (image, container...)
+ type: string
+)
+
# GetVersion returns version and build information of the podman service
method GetVersion() -> (
version: string,
@@ -459,6 +484,11 @@ method ListContainers() -> (containers: []Container)
# [InspectContainer](#InspectContainer).
method GetContainer(id: string) -> (container: Container)
+# GetContainersByContext allows you to get a list of container ids depending on all, latest, or a list of
+# container names. The definition of latest container means the latest by creation date. In a multi-
+# user environment, results might differ from what you expect.
+method GetContainersByContext(all: bool, latest: bool, args: []string) -> (containers: []string)
+
# CreateContainer creates a new container from an image. It uses a [Create](#Create) type for input. The minimum
# input required for CreateContainer is an image name. If the image name is not found, an [ImageNotFound](#ImageNotFound)
# error will be returned. Otherwise, the ID of the newly created container will be returned.
@@ -500,6 +530,8 @@ method ListContainerProcesses(name: string, opts: []string) -> (container: []str
# capability of varlink if the client invokes it.
method GetContainerLogs(name: string) -> (container: []string)
+method GetContainersLogs(names: []string, follow: bool, latest: bool, since: string, tail: int, timestamps: bool) -> (log: LogLine)
+
# ListContainerChanges takes a name or ID of a container and returns changes between the container and
# its base image. It returns a struct of changed, deleted, and added path names.
method ListContainerChanges(name: string) -> (container: ContainerChanges)
@@ -544,6 +576,10 @@ method ExportContainer(name: string, path: string) -> (tarfile: string)
# ~~~
method GetContainerStats(name: string) -> (container: ContainerStats)
+# GetContainerStatsWithHistory takes a previous set of container statistics and uses libpod functions
+# to calculate the containers statistics based on current and previous measurements.
+method GetContainerStatsWithHistory(previousStats: ContainerStats) -> (container: ContainerStats)
+
# This method has not be implemented yet.
# method ResizeContainerTty() -> (notimplemented: NotImplemented)
@@ -612,10 +648,10 @@ method UnpauseContainer(name: string) -> (container: string)
# ~~~
method GetAttachSockets(name: string) -> (sockets: Sockets)
-# WaitContainer takes the name or ID of a container and waits until the container stops. Upon stopping, the return
-# code of the container is returned. If the container container cannot be found by ID or name,
-# a [ContainerNotFound](#ContainerNotFound) error is returned.
-method WaitContainer(name: string) -> (exitcode: int)
+# WaitContainer takes the name or ID of a container and waits the given interval in milliseconds until the container
+# stops. Upon stopping, the return code of the container is returned. If the container container cannot be found by ID
+# or name, a [ContainerNotFound](#ContainerNotFound) error is returned.
+method WaitContainer(name: string, interval: int) -> (exitcode: int)
# RemoveContainer requires the name or ID of container as well a boolean representing whether a running container can be stopped and removed, and a boolean
# indicating whether to remove builtin volumes. Upon successful removal of the
@@ -647,7 +683,7 @@ method RemoveContainer(name: string, force: bool, removeVolumes: bool) -> (conta
method DeleteStoppedContainers() -> (containers: []string)
# ListImages returns information about the images that are currently in storage.
-# See also [InspectImage](InspectImage).
+# See also [InspectImage](#InspectImage).
method ListImages() -> (images: []Image)
# GetImage returns information about a single image in storage.
@@ -947,8 +983,7 @@ method RemovePod(name: string, force: bool) -> (pod: string)
# This method has not be implemented yet.
# method WaitPod() -> (notimplemented: NotImplemented)
-# This method has not been implemented yet.
-# method TopPod() -> (notimplemented: NotImplemented)
+method TopPod(pod: string, latest: bool, descriptors: []string) -> (stats: []string)
# GetPodStats takes the name or ID of a pod and returns a pod name and slice of ContainerStats structure which
# contains attributes like memory and cpu usage. If the pod cannot be found, a [PodNotFound](#PodNotFound)
@@ -1076,7 +1111,7 @@ method ContainerArtifacts(name: string, artifactName: string) -> (config: string
# ContainerInspectData returns a container's inspect data in string form. This call is for
# development of Podman only and generally should not be used.
-method ContainerInspectData(name: string) -> (config: string)
+method ContainerInspectData(name: string, size: bool) -> (config: string)
# ContainerStateData returns a container's state config in string form. This call is for
# development of Podman only and generally should not be used.
@@ -1115,6 +1150,9 @@ method GetPodsByContext(all: bool, latest: bool, args: []string) -> (pods: []str
# LoadImage allows you to load an image into local storage from a tarball.
method LoadImage(name: string, inputFile: string, quiet: bool, deleteFile: bool) -> (reply: MoreResponse)
+# GetEvents returns known libpod events filtered by the options provided.
+method GetEvents(filter: []string, since: string, until: string) -> (events: Event)
+
# ImageNotFound means the image could not be found by the provided name or ID in local storage.
error ImageNotFound (id: string, reason: string)
@@ -1144,3 +1182,6 @@ error ErrorOccurred (reason: string)
# RuntimeErrors generally means a runtime could not be found or gotten.
error RuntimeError (reason: string)
+
+# The Podman endpoint requires that you use a streaming connection.
+error WantsMoreRequired (reason: string)