Skip to content

Commit 27bb861

Browse files
committed
Add plugin info call to introspection API
Signed-off-by: Derek McGowan <[email protected]>
1 parent 3616b9c commit 27bb861

12 files changed

Lines changed: 520 additions & 250 deletions

File tree

api/next.pb.txt

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4311,6 +4311,24 @@ file {
43114311
name: "github.com/containerd/containerd/api/types/introspection.proto"
43124312
package: "containerd.types"
43134313
dependency: "google/protobuf/any.proto"
4314+
message_type {
4315+
name: "RuntimeRequest"
4316+
field {
4317+
name: "runtime_path"
4318+
number: 1
4319+
label: LABEL_OPTIONAL
4320+
type: TYPE_STRING
4321+
json_name: "runtimePath"
4322+
}
4323+
field {
4324+
name: "options"
4325+
number: 2
4326+
label: LABEL_OPTIONAL
4327+
type: TYPE_MESSAGE
4328+
type_name: ".google.protobuf.Any"
4329+
json_name: "options"
4330+
}
4331+
}
43144332
message_type {
43154333
name: "RuntimeVersion"
43164334
field {
@@ -4596,23 +4614,49 @@ file {
45964614
}
45974615
}
45984616
message_type {
4599-
name: "RuntimeRequest"
4617+
name: "PluginInfoRequest"
46004618
field {
4601-
name: "runtime_path"
4619+
name: "type"
46024620
number: 1
46034621
label: LABEL_OPTIONAL
46044622
type: TYPE_STRING
4605-
json_name: "runtimePath"
4623+
json_name: "type"
46064624
}
46074625
field {
4608-
name: "options"
4626+
name: "id"
46094627
number: 2
46104628
label: LABEL_OPTIONAL
4629+
type: TYPE_STRING
4630+
json_name: "id"
4631+
}
4632+
field {
4633+
name: "options"
4634+
number: 3
4635+
label: LABEL_OPTIONAL
46114636
type: TYPE_MESSAGE
46124637
type_name: ".google.protobuf.Any"
46134638
json_name: "options"
46144639
}
46154640
}
4641+
message_type {
4642+
name: "PluginInfoResponse"
4643+
field {
4644+
name: "plugin"
4645+
number: 1
4646+
label: LABEL_OPTIONAL
4647+
type: TYPE_MESSAGE
4648+
type_name: ".containerd.services.introspection.v1.Plugin"
4649+
json_name: "plugin"
4650+
}
4651+
field {
4652+
name: "extra"
4653+
number: 2
4654+
label: LABEL_OPTIONAL
4655+
type: TYPE_MESSAGE
4656+
type_name: ".google.protobuf.Any"
4657+
json_name: "extra"
4658+
}
4659+
}
46164660
service {
46174661
name: "Introspection"
46184662
method {
@@ -4626,9 +4670,9 @@ file {
46264670
output_type: ".containerd.services.introspection.v1.ServerResponse"
46274671
}
46284672
method {
4629-
name: "Runtime"
4630-
input_type: ".containerd.services.introspection.v1.RuntimeRequest"
4631-
output_type: ".containerd.types.RuntimeInfo"
4673+
name: "PluginInfo"
4674+
input_type: ".containerd.services.introspection.v1.PluginInfoRequest"
4675+
output_type: ".containerd.services.introspection.v1.PluginInfoResponse"
46324676
}
46334677
}
46344678
options {

api/services/introspection/v1/introspection.pb.go

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

api/services/introspection/v1/introspection.proto

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ service Introspection {
3535
rpc Plugins(PluginsRequest) returns (PluginsResponse);
3636
// Server returns information about the containerd server
3737
rpc Server(google.protobuf.Empty) returns (ServerResponse);
38-
// Runtime returns the runtime info
39-
rpc Runtime(RuntimeRequest) returns (types.RuntimeInfo);
38+
// PluginInfo returns information directly from a plugin if the plugin supports it
39+
rpc PluginInfo(PluginInfoRequest) returns (PluginInfoResponse);
4040
}
4141

4242
message Plugin {
@@ -116,9 +116,18 @@ message DeprecationWarning {
116116
google.protobuf.Timestamp last_occurrence = 3;
117117
}
118118

119-
message RuntimeRequest {
120-
string runtime_path = 1;
121-
// Options correspond to CreateTaskRequest.options.
122-
// This is needed to pass the runc binary path, etc.
123-
google.protobuf.Any options = 2;
119+
message PluginInfoRequest {
120+
string type = 1;
121+
string id = 2;
122+
123+
// Options may be used to request extra dynamic information from
124+
// a plugin.
125+
// This object is determined by the plugin and the plugin may return
126+
// NotImplemented or InvalidArgument if it is not supported
127+
google.protobuf.Any options = 3;
128+
}
129+
130+
message PluginInfoResponse {
131+
Plugin plugin = 1;
132+
google.protobuf.Any extra = 2;
124133
}

api/services/introspection/v1/introspection_grpc.pb.go

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

0 commit comments

Comments
 (0)