mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
daemon/server/backend: remove ExecInspect, ExecProcessConfig alias
Type type was defined before the API had a definition fro the exec-inspect
response. When a type definition was added in [moby@2a34207], the definition
was moved from the backend to the API, and the backend type implemented as
an alias.
Technically, we could keep a _concrete_ type for the backend, and handle
conversion to the corresponding API type in the router, but currently,
this would likely only add extra complexity.
We could still opt for doing so when the backend requires additional fields
or changes that should not be reflected in the API response.
[moby@2a34207]: 2a342079c6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -184,7 +184,7 @@ func (daemon *Daemon) getInspectData(daemonCfg *config.Config, ctr *container.Co
|
||||
|
||||
// ContainerExecInspect returns low-level information about the exec
|
||||
// command. An error is returned if the exec cannot be found.
|
||||
func (daemon *Daemon) ContainerExecInspect(id string) (*backend.ExecInspect, error) {
|
||||
func (daemon *Daemon) ContainerExecInspect(id string) (*containertypes.ExecInspectResponse, error) {
|
||||
e := daemon.execCommands.Get(id)
|
||||
if e == nil {
|
||||
return nil, errExecNotFound(id)
|
||||
@@ -209,11 +209,11 @@ func (daemon *Daemon) ContainerExecInspect(id string) (*backend.ExecInspect, err
|
||||
privileged = &e.Privileged
|
||||
}
|
||||
|
||||
return &backend.ExecInspect{
|
||||
return &containertypes.ExecInspectResponse{
|
||||
ID: e.ID,
|
||||
Running: e.Running,
|
||||
ExitCode: e.ExitCode,
|
||||
ProcessConfig: &backend.ExecProcessConfig{
|
||||
ProcessConfig: &containertypes.ExecProcessConfig{
|
||||
Tty: e.Tty,
|
||||
Entrypoint: e.Entrypoint,
|
||||
Arguments: e.Args,
|
||||
|
||||
Reference in New Issue
Block a user