github.com/containers/libpod@v1.9.4-0.20220419124438-4284fd425507/libpod/define/inspect.go (about)

     1  package define
     2  
     3  // InspectExecSession contains information about a given exec session.
     4  type InspectExecSession struct {
     5  	// CanRemove is legacy and used purely for compatibility reasons.
     6  	// Will always be set to true, unless the exec session is running.
     7  	CanRemove bool `json:"CanRemove"`
     8  	// ContainerID is the ID of the container this exec session is attached
     9  	// to.
    10  	ContainerID string `json:"ContainerID"`
    11  	// DetachKeys are the detach keys used by the exec session.
    12  	// If set to "" the default keys are being used.
    13  	// Will show "<none>" if no detach keys are set.
    14  	DetachKeys string `json:"DetachKeys"`
    15  	// ExitCode is the exit code of the exec session. Will be set to 0 if
    16  	// the exec session has not yet exited.
    17  	ExitCode int `json:"ExitCode"`
    18  	// ID is the ID of the exec session.
    19  	ID string `json:"ID"`
    20  	// OpenStderr is whether the container's STDERR stream will be attached.
    21  	// Always set to true if the exec session created a TTY.
    22  	OpenStderr bool `json:"OpenStderr"`
    23  	// OpenStdin is whether the container's STDIN stream will be attached
    24  	// to.
    25  	OpenStdin bool `json:"OpenStdin"`
    26  	// OpenStdout is whether the container's STDOUT stream will be attached.
    27  	// Always set to true if the exec session created a TTY.
    28  	OpenStdout bool `json:"OpenStdout"`
    29  	// Running is whether the exec session is running.
    30  	Running bool `json:"Running"`
    31  	// Pid is the PID of the exec session's process.
    32  	// Will be set to 0 if the exec session is not running.
    33  	Pid int `json:"Pid"`
    34  	// ProcessConfig contains information about the exec session's process.
    35  	ProcessConfig *InspectExecProcess `json:"ProcessConfig"`
    36  }
    37  
    38  // InspectExecProcess contains information about the process in a given exec
    39  // session.
    40  type InspectExecProcess struct {
    41  	// Arguments are the arguments to the entrypoint command of the exec
    42  	// session.
    43  	Arguments []string `json:"arguments"`
    44  	// Entrypoint is the entrypoint for the exec session (the command that
    45  	// will be executed in the container).
    46  	Entrypoint string `json:"entrypoint"`
    47  	// Privileged is whether the exec session will be started with elevated
    48  	// privileges.
    49  	Privileged bool `json:"privileged"`
    50  	// Tty is whether the exec session created a terminal.
    51  	Tty bool `json:"tty"`
    52  	// User is the user the exec session was started as.
    53  	User string `json:"user"`
    54  }