Skip to content

Commit 12c79cc

Browse files
Merge pull request containerd#1604 from jessvalarezo/windows-listpids
ListPids returns process details in addition to process IDs.
2 parents 96725a5 + 061c719 commit 12c79cc

File tree

18 files changed

+1120
-407
lines changed

18 files changed

+1120
-407
lines changed

api/next.pb.txt

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2956,6 +2956,7 @@ file {
29562956
package: "containerd.v1.types"
29572957
dependency: "gogoproto/gogo.proto"
29582958
dependency: "google/protobuf/timestamp.proto"
2959+
dependency: "google/protobuf/any.proto"
29592960
message_type {
29602961
name: "Process"
29612962
field {
@@ -3035,6 +3036,24 @@ file {
30353036
json_name: "exitedAt"
30363037
}
30373038
}
3039+
message_type {
3040+
name: "ProcessInfo"
3041+
field {
3042+
name: "pid"
3043+
number: 1
3044+
label: LABEL_OPTIONAL
3045+
type: TYPE_UINT32
3046+
json_name: "pid"
3047+
}
3048+
field {
3049+
name: "info"
3050+
number: 2
3051+
label: LABEL_OPTIONAL
3052+
type: TYPE_MESSAGE
3053+
type_name: ".google.protobuf.Any"
3054+
json_name: "info"
3055+
}
3056+
}
30383057
enum_type {
30393058
name: "Status"
30403059
value {
@@ -3490,11 +3509,12 @@ file {
34903509
message_type {
34913510
name: "ListPidsResponse"
34923511
field {
3493-
name: "pids"
3512+
name: "processes"
34943513
number: 1
34953514
label: LABEL_REPEATED
3496-
type: TYPE_UINT32
3497-
json_name: "pids"
3515+
type: TYPE_MESSAGE
3516+
type_name: ".containerd.v1.types.ProcessInfo"
3517+
json_name: "processes"
34983518
}
34993519
}
35003520
message_type {

api/services/tasks/v1/tasks.pb.go

Lines changed: 131 additions & 167 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/services/tasks/v1/tasks.proto

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,9 @@ message ListPidsRequest {
170170
string container_id = 1;
171171
}
172172

173-
message ListPidsResponse{
174-
repeated uint32 pids = 1;
173+
message ListPidsResponse {
174+
// Processes includes the process ID and additional process information
175+
repeated containerd.v1.types.ProcessInfo processes = 1;
175176
}
176177

177178
message CheckpointTaskRequest {

api/types/task/task.pb.go

Lines changed: 210 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/types/task/task.proto

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package containerd.v1.types;
44

55
import "gogoproto/gogo.proto";
66
import "google/protobuf/timestamp.proto";
7+
import "google/protobuf/any.proto";
78

89
enum Status {
910
option (gogoproto.goproto_enum_prefix) = false;
@@ -29,3 +30,12 @@ message Process {
2930
uint32 exit_status = 9;
3031
google.protobuf.Timestamp exited_at = 10 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
3132
}
33+
34+
message ProcessInfo {
35+
// PID is the process ID.
36+
uint32 pid = 1;
37+
// Info contains additional process information.
38+
//
39+
// Info varies by platform.
40+
google.protobuf.Any info = 2;
41+
}

0 commit comments

Comments
 (0)