Remove protos from Go client API
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/containerd/containerd/api/services/containers/v1"
|
||||
tasks "github.com/containerd/containerd/api/services/tasks/v1"
|
||||
"github.com/containerd/containerd/images"
|
||||
"github.com/containerd/containerd/typeurl"
|
||||
"github.com/opencontainers/image-spec/specs-go/v1"
|
||||
@@ -87,12 +86,8 @@ func WithSpec(spec *specs.Spec) NewContainerOpts {
|
||||
}
|
||||
|
||||
func WithResources(resources *specs.WindowsResources) UpdateTaskOpts {
|
||||
return func(ctx context.Context, client *Client, r *tasks.UpdateTaskRequest) error {
|
||||
any, err := typeurl.MarshalAny(resources)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
r.Resources = any
|
||||
return func(ctx context.Context, client *Client, r *UpdateTaskInfo) error {
|
||||
r.Resources = resources
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user