use typeurl funcs for marshalling anypb.Any
Signed-off-by: Akhil Mohan <akhilerm@gmail.com>
This commit is contained in:
@@ -461,7 +461,7 @@ func (l *local) ListPids(ctx context.Context, r *api.ListPidsRequest, _ ...grpc.
|
||||
Pid: p.Pid,
|
||||
}
|
||||
if p.Info != nil {
|
||||
a, err := protobuf.MarshalAnyToProto(p.Info)
|
||||
a, err := typeurl.MarshalAnyToProto(p.Info)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to marshal process %d info: %w", p.Pid, err)
|
||||
}
|
||||
@@ -576,7 +576,7 @@ func (l *local) Checkpoint(ctx context.Context, r *api.CheckpointTaskRequest, _
|
||||
return nil, err
|
||||
}
|
||||
// write the config to the content store
|
||||
pbany := protobuf.FromAny(container.Spec)
|
||||
pbany := typeurl.MarshalProto(container.Spec)
|
||||
data, err := proto.Marshal(pbany)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user