Add CloseStdin to task
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
9
task.go
9
task.go
@@ -32,6 +32,7 @@ type Task interface {
|
||||
Wait(context.Context) (uint32, error)
|
||||
Exec(context.Context, *specs.Process, IOCreation) (Process, error)
|
||||
Processes(context.Context) ([]uint32, error)
|
||||
CloseStdin(context.Context) error
|
||||
}
|
||||
|
||||
type Process interface {
|
||||
@@ -158,3 +159,11 @@ func (t *task) Processes(ctx context.Context) ([]uint32, error) {
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (t *task) CloseStdin(ctx context.Context) error {
|
||||
_, err := t.client.TaskService().CloseStdin(ctx, &execution.CloseStdinRequest{
|
||||
ContainerID: t.containerID,
|
||||
Pid: t.pid,
|
||||
})
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user