Merge pull request #3117 from crosbymichael/exec-load
Fastpath opt and ExecProcess loading
This commit is contained in:
commit
8ea28ff564
@ -774,6 +774,7 @@ func removeCap(caps *[]string, s string) {
|
|||||||
for i, c := range *caps {
|
for i, c := range *caps {
|
||||||
if c == s {
|
if c == s {
|
||||||
*caps = append((*caps)[:i], (*caps)[i+1:]...)
|
*caps = append((*caps)[:i], (*caps)[i+1:]...)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
task.go
3
task.go
@ -521,6 +521,9 @@ func (t *task) Update(ctx context.Context, opts ...UpdateTaskOpts) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (t *task) LoadProcess(ctx context.Context, id string, ioAttach cio.Attach) (Process, error) {
|
func (t *task) LoadProcess(ctx context.Context, id string, ioAttach cio.Attach) (Process, error) {
|
||||||
|
if id == t.id && ioAttach == nil {
|
||||||
|
return t, nil
|
||||||
|
}
|
||||||
response, err := t.client.TaskService().Get(ctx, &tasks.GetRequest{
|
response, err := t.client.TaskService().Get(ctx, &tasks.GetRequest{
|
||||||
ContainerID: t.id,
|
ContainerID: t.id,
|
||||||
ExecID: id,
|
ExecID: id,
|
||||||
|
Loading…
Reference in New Issue
Block a user