diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-04-15 17:14:24 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 17:14:24 -0700 |
commit | d6b3bc18f85236aa753d8a8a7993d160dbdad3f8 (patch) | |
tree | ec41b7d9fb987aff6346b8f9e5f96580e523e918 /libpod/define/ctr_inspect.go | |
parent | c7d17613ec7635413c035e0ed0b8700c56430303 (diff) | |
parent | 82ce9703e11a87bf67fb619ae2f35086d091441a (diff) | |
download | podman-d6b3bc18f85236aa753d8a8a7993d160dbdad3f8.tar.gz podman-d6b3bc18f85236aa753d8a8a7993d160dbdad3f8.tar.bz2 podman-d6b3bc18f85236aa753d8a8a7993d160dbdad3f8.zip |
Merge pull request #5752 from mheon/pod_inspect_structs
Add basic structure of output for APIv2 pod inspect
Diffstat (limited to 'libpod/define/ctr_inspect.go')
-rw-r--r-- | libpod/define/ctr_inspect.go | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/libpod/define/ctr_inspect.go b/libpod/define/ctr_inspect.go new file mode 100644 index 000000000..b7cd13f82 --- /dev/null +++ b/libpod/define/ctr_inspect.go @@ -0,0 +1,54 @@ +package define + +// InspectExecSession contains information about a given exec session. +type InspectExecSession struct { + // CanRemove is legacy and used purely for compatibility reasons. + // Will always be set to true, unless the exec session is running. + CanRemove bool `json:"CanRemove"` + // ContainerID is the ID of the container this exec session is attached + // to. + ContainerID string `json:"ContainerID"` + // DetachKeys are the detach keys used by the exec session. + // If set to "" the default keys are being used. + // Will show "<none>" if no detach keys are set. + DetachKeys string `json:"DetachKeys"` + // ExitCode is the exit code of the exec session. Will be set to 0 if + // the exec session has not yet exited. + ExitCode int `json:"ExitCode"` + // ID is the ID of the exec session. + ID string `json:"ID"` + // OpenStderr is whether the container's STDERR stream will be attached. + // Always set to true if the exec session created a TTY. + OpenStderr bool `json:"OpenStderr"` + // OpenStdin is whether the container's STDIN stream will be attached + // to. + OpenStdin bool `json:"OpenStdin"` + // OpenStdout is whether the container's STDOUT stream will be attached. + // Always set to true if the exec session created a TTY. + OpenStdout bool `json:"OpenStdout"` + // Running is whether the exec session is running. + Running bool `json:"Running"` + // Pid is the PID of the exec session's process. + // Will be set to 0 if the exec session is not running. + Pid int `json:"Pid"` + // ProcessConfig contains information about the exec session's process. + ProcessConfig *InspectExecProcess `json:"ProcessConfig"` +} + +// InspectExecProcess contains information about the process in a given exec +// session. +type InspectExecProcess struct { + // Arguments are the arguments to the entrypoint command of the exec + // session. + Arguments []string `json:"arguments"` + // Entrypoint is the entrypoint for the exec session (the command that + // will be executed in the container). + Entrypoint string `json:"entrypoint"` + // Privileged is whether the exec session will be started with elevated + // privileges. + Privileged bool `json:"privileged"` + // Tty is whether the exec session created a terminal. + Tty bool `json:"tty"` + // User is the user the exec session was started as. + User string `json:"user"` +} |