@@ -22,10 +22,10 @@ import (
22
22
"sync"
23
23
"time"
24
24
25
- ptypes "github.com/gogo/protobuf/types"
26
25
"google.golang.org/grpc"
27
26
"google.golang.org/grpc/backoff"
28
27
"google.golang.org/grpc/credentials/insecure"
28
+ emptypb "google.golang.org/protobuf/types/known/emptypb"
29
29
30
30
containersapi "github.com/containerd/containerd/api/services/containers/v1"
31
31
tasksapi "github.com/containerd/containerd/api/services/tasks/v1"
@@ -126,22 +126,23 @@ func (c *client) TaskPid(ctx context.Context, id string) (uint32, error) {
126
126
if err != nil {
127
127
return 0 , errdefs .FromGRPC (err )
128
128
}
129
- if response .Process .Status == tasktypes .StatusUnknown {
129
+ if response .Process .Status == tasktypes .Status_UNKNOWN {
130
130
return 0 , ErrTaskIsInUnknownState
131
131
}
132
132
return response .Process .Pid , nil
133
133
}
134
134
135
135
func (c * client ) Version (ctx context.Context ) (string , error ) {
136
- response , err := c .versionService .Version (ctx , & ptypes .Empty {})
136
+ response , err := c .versionService .Version (ctx , & emptypb .Empty {})
137
137
if err != nil {
138
138
return "" , errdefs .FromGRPC (err )
139
139
}
140
140
return response .Version , nil
141
141
}
142
142
143
- func containerFromProto (containerpb containersapi.Container ) * containers.Container {
143
+ func containerFromProto (containerpb * containersapi.Container ) * containers.Container {
144
144
var runtime containers.RuntimeInfo
145
+ // TODO: is nil check required for containerpb
145
146
if containerpb .Runtime != nil {
146
147
runtime = containers.RuntimeInfo {
147
148
Name : containerpb .Runtime .Name ,
0 commit comments