Update ctr shim subcommand to task v3
Signed-off-by: Henry Wang <henwang@amazon.com>
This commit is contained in:
parent
857dc6f89e
commit
b8060d641d
@ -28,7 +28,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/containerd/console"
|
"github.com/containerd/console"
|
||||||
"github.com/containerd/containerd/api/runtime/task/v2"
|
"github.com/containerd/containerd/api/runtime/task/v3"
|
||||||
"github.com/containerd/containerd/v2/cmd/ctr/commands"
|
"github.com/containerd/containerd/v2/cmd/ctr/commands"
|
||||||
"github.com/containerd/containerd/v2/pkg/namespaces"
|
"github.com/containerd/containerd/v2/pkg/namespaces"
|
||||||
ptypes "github.com/containerd/containerd/v2/pkg/protobuf/types"
|
ptypes "github.com/containerd/containerd/v2/pkg/protobuf/types"
|
||||||
@ -232,7 +232,7 @@ var execCommand = &cli.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func getTaskService(context *cli.Context) (task.TaskService, error) {
|
func getTaskService(context *cli.Context) (task.TTRPCTaskService, error) {
|
||||||
id := context.String("id")
|
id := context.String("id")
|
||||||
if id == "" {
|
if id == "" {
|
||||||
return nil, fmt.Errorf("container id must be specified")
|
return nil, fmt.Errorf("container id must be specified")
|
||||||
@ -255,7 +255,7 @@ func getTaskService(context *cli.Context) (task.TaskService, error) {
|
|||||||
// TODO(stevvooe): This actually leaks the connection. We were leaking it
|
// TODO(stevvooe): This actually leaks the connection. We were leaking it
|
||||||
// before, so may not be a huge deal.
|
// before, so may not be a huge deal.
|
||||||
|
|
||||||
return task.NewTaskClient(client), nil
|
return task.NewTTRPCTaskClient(client), nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user