Use Any instead of []byte
This allows us to get the fully TypeURL for consuming code. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
@@ -121,10 +121,6 @@ func (s *Service) Create(ctx context.Context, r *api.CreateTaskRequest) (*api.Cr
|
||||
if err != nil {
|
||||
return nil, errdefs.ToGRPC(err)
|
||||
}
|
||||
var options []byte
|
||||
if r.Options != nil {
|
||||
options = r.Options.Value
|
||||
}
|
||||
opts := runtime.CreateOpts{
|
||||
Spec: container.Spec,
|
||||
IO: runtime.IO{
|
||||
@@ -134,7 +130,7 @@ func (s *Service) Create(ctx context.Context, r *api.CreateTaskRequest) (*api.Cr
|
||||
Terminal: r.Terminal,
|
||||
},
|
||||
Checkpoint: checkpointPath,
|
||||
Options: options,
|
||||
Options: r.Options,
|
||||
}
|
||||
for _, m := range r.Rootfs {
|
||||
opts.Rootfs = append(opts.Rootfs, mount.Mount{
|
||||
@@ -361,7 +357,7 @@ func (s *Service) Exec(ctx context.Context, r *api.ExecProcessRequest) (*api.Exe
|
||||
return nil, err
|
||||
}
|
||||
process, err := t.Exec(ctx, runtime.ExecOpts{
|
||||
Spec: r.Spec.Value,
|
||||
Spec: r.Spec,
|
||||
IO: runtime.IO{
|
||||
Stdin: r.Stdin,
|
||||
Stdout: r.Stdout,
|
||||
@@ -418,11 +414,7 @@ func (s *Service) Checkpoint(ctx context.Context, r *api.CheckpointTaskRequest)
|
||||
return nil, err
|
||||
}
|
||||
defer os.RemoveAll(image)
|
||||
var options []byte
|
||||
if r.Options != nil {
|
||||
options = r.Options.Value
|
||||
}
|
||||
if err := t.Checkpoint(ctx, image, options); err != nil {
|
||||
if err := t.Checkpoint(ctx, image, r.Options); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
// write checkpoint to the content store
|
||||
@@ -454,7 +446,7 @@ func (s *Service) Update(ctx context.Context, r *api.UpdateTaskRequest) (*google
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := t.Update(ctx, r.Resources.Value); err != nil {
|
||||
if err := t.Update(ctx, r.Resources); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return empty, nil
|
||||
|
||||
Reference in New Issue
Block a user