1#![allow(unknown_lints)]
6#![allow(clippy::all)]
7
8#![cfg_attr(rustfmt, rustfmt_skip)]
9
10#![allow(box_pointers)]
11#![allow(dead_code)]
12#![allow(missing_docs)]
13#![allow(non_camel_case_types)]
14#![allow(non_snake_case)]
15#![allow(non_upper_case_globals)]
16#![allow(trivial_casts)]
17#![allow(unsafe_code)]
18#![allow(unused_imports)]
19#![allow(unused_results)]
20
21const METHOD_RUNTIME_SERVICE_VERSION: ::grpcio::Method<super::api::VersionRequest, super::api::VersionResponse> = ::grpcio::Method {
22 ty: ::grpcio::MethodType::Unary,
23 name: "/runtime.v1alpha2.RuntimeService/Version",
24 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
25 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
26};
27
28const METHOD_RUNTIME_SERVICE_RUN_POD_SANDBOX: ::grpcio::Method<super::api::RunPodSandboxRequest, super::api::RunPodSandboxResponse> = ::grpcio::Method {
29 ty: ::grpcio::MethodType::Unary,
30 name: "/runtime.v1alpha2.RuntimeService/RunPodSandbox",
31 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
32 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
33};
34
35const METHOD_RUNTIME_SERVICE_STOP_POD_SANDBOX: ::grpcio::Method<super::api::StopPodSandboxRequest, super::api::StopPodSandboxResponse> = ::grpcio::Method {
36 ty: ::grpcio::MethodType::Unary,
37 name: "/runtime.v1alpha2.RuntimeService/StopPodSandbox",
38 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
39 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
40};
41
42const METHOD_RUNTIME_SERVICE_REMOVE_POD_SANDBOX: ::grpcio::Method<super::api::RemovePodSandboxRequest, super::api::RemovePodSandboxResponse> = ::grpcio::Method {
43 ty: ::grpcio::MethodType::Unary,
44 name: "/runtime.v1alpha2.RuntimeService/RemovePodSandbox",
45 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
46 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
47};
48
49const METHOD_RUNTIME_SERVICE_POD_SANDBOX_STATUS: ::grpcio::Method<super::api::PodSandboxStatusRequest, super::api::PodSandboxStatusResponse> = ::grpcio::Method {
50 ty: ::grpcio::MethodType::Unary,
51 name: "/runtime.v1alpha2.RuntimeService/PodSandboxStatus",
52 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
53 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
54};
55
56const METHOD_RUNTIME_SERVICE_LIST_POD_SANDBOX: ::grpcio::Method<super::api::ListPodSandboxRequest, super::api::ListPodSandboxResponse> = ::grpcio::Method {
57 ty: ::grpcio::MethodType::Unary,
58 name: "/runtime.v1alpha2.RuntimeService/ListPodSandbox",
59 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
60 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
61};
62
63const METHOD_RUNTIME_SERVICE_CREATE_CONTAINER: ::grpcio::Method<super::api::CreateContainerRequest, super::api::CreateContainerResponse> = ::grpcio::Method {
64 ty: ::grpcio::MethodType::Unary,
65 name: "/runtime.v1alpha2.RuntimeService/CreateContainer",
66 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
67 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
68};
69
70const METHOD_RUNTIME_SERVICE_START_CONTAINER: ::grpcio::Method<super::api::StartContainerRequest, super::api::StartContainerResponse> = ::grpcio::Method {
71 ty: ::grpcio::MethodType::Unary,
72 name: "/runtime.v1alpha2.RuntimeService/StartContainer",
73 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
74 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
75};
76
77const METHOD_RUNTIME_SERVICE_STOP_CONTAINER: ::grpcio::Method<super::api::StopContainerRequest, super::api::StopContainerResponse> = ::grpcio::Method {
78 ty: ::grpcio::MethodType::Unary,
79 name: "/runtime.v1alpha2.RuntimeService/StopContainer",
80 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
81 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
82};
83
84const METHOD_RUNTIME_SERVICE_REMOVE_CONTAINER: ::grpcio::Method<super::api::RemoveContainerRequest, super::api::RemoveContainerResponse> = ::grpcio::Method {
85 ty: ::grpcio::MethodType::Unary,
86 name: "/runtime.v1alpha2.RuntimeService/RemoveContainer",
87 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
88 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
89};
90
91const METHOD_RUNTIME_SERVICE_LIST_CONTAINERS: ::grpcio::Method<super::api::ListContainersRequest, super::api::ListContainersResponse> = ::grpcio::Method {
92 ty: ::grpcio::MethodType::Unary,
93 name: "/runtime.v1alpha2.RuntimeService/ListContainers",
94 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
95 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
96};
97
98const METHOD_RUNTIME_SERVICE_CONTAINER_STATUS: ::grpcio::Method<super::api::ContainerStatusRequest, super::api::ContainerStatusResponse> = ::grpcio::Method {
99 ty: ::grpcio::MethodType::Unary,
100 name: "/runtime.v1alpha2.RuntimeService/ContainerStatus",
101 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
102 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
103};
104
105const METHOD_RUNTIME_SERVICE_UPDATE_CONTAINER_RESOURCES: ::grpcio::Method<super::api::UpdateContainerResourcesRequest, super::api::UpdateContainerResourcesResponse> = ::grpcio::Method {
106 ty: ::grpcio::MethodType::Unary,
107 name: "/runtime.v1alpha2.RuntimeService/UpdateContainerResources",
108 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
109 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
110};
111
112const METHOD_RUNTIME_SERVICE_REOPEN_CONTAINER_LOG: ::grpcio::Method<super::api::ReopenContainerLogRequest, super::api::ReopenContainerLogResponse> = ::grpcio::Method {
113 ty: ::grpcio::MethodType::Unary,
114 name: "/runtime.v1alpha2.RuntimeService/ReopenContainerLog",
115 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
116 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
117};
118
119const METHOD_RUNTIME_SERVICE_EXEC_SYNC: ::grpcio::Method<super::api::ExecSyncRequest, super::api::ExecSyncResponse> = ::grpcio::Method {
120 ty: ::grpcio::MethodType::Unary,
121 name: "/runtime.v1alpha2.RuntimeService/ExecSync",
122 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
123 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
124};
125
126const METHOD_RUNTIME_SERVICE_EXEC: ::grpcio::Method<super::api::ExecRequest, super::api::ExecResponse> = ::grpcio::Method {
127 ty: ::grpcio::MethodType::Unary,
128 name: "/runtime.v1alpha2.RuntimeService/Exec",
129 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
130 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
131};
132
133const METHOD_RUNTIME_SERVICE_ATTACH: ::grpcio::Method<super::api::AttachRequest, super::api::AttachResponse> = ::grpcio::Method {
134 ty: ::grpcio::MethodType::Unary,
135 name: "/runtime.v1alpha2.RuntimeService/Attach",
136 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
137 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
138};
139
140const METHOD_RUNTIME_SERVICE_PORT_FORWARD: ::grpcio::Method<super::api::PortForwardRequest, super::api::PortForwardResponse> = ::grpcio::Method {
141 ty: ::grpcio::MethodType::Unary,
142 name: "/runtime.v1alpha2.RuntimeService/PortForward",
143 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
144 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
145};
146
147const METHOD_RUNTIME_SERVICE_CONTAINER_STATS: ::grpcio::Method<super::api::ContainerStatsRequest, super::api::ContainerStatsResponse> = ::grpcio::Method {
148 ty: ::grpcio::MethodType::Unary,
149 name: "/runtime.v1alpha2.RuntimeService/ContainerStats",
150 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
151 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
152};
153
154const METHOD_RUNTIME_SERVICE_LIST_CONTAINER_STATS: ::grpcio::Method<super::api::ListContainerStatsRequest, super::api::ListContainerStatsResponse> = ::grpcio::Method {
155 ty: ::grpcio::MethodType::Unary,
156 name: "/runtime.v1alpha2.RuntimeService/ListContainerStats",
157 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
158 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
159};
160
161const METHOD_RUNTIME_SERVICE_UPDATE_RUNTIME_CONFIG: ::grpcio::Method<super::api::UpdateRuntimeConfigRequest, super::api::UpdateRuntimeConfigResponse> = ::grpcio::Method {
162 ty: ::grpcio::MethodType::Unary,
163 name: "/runtime.v1alpha2.RuntimeService/UpdateRuntimeConfig",
164 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
165 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
166};
167
168const METHOD_RUNTIME_SERVICE_STATUS: ::grpcio::Method<super::api::StatusRequest, super::api::StatusResponse> = ::grpcio::Method {
169 ty: ::grpcio::MethodType::Unary,
170 name: "/runtime.v1alpha2.RuntimeService/Status",
171 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
172 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
173};
174
175#[derive(Clone)]
176pub struct RuntimeServiceClient {
177 client: ::grpcio::Client,
178}
179
180impl RuntimeServiceClient {
181 pub fn new(channel: ::grpcio::Channel) -> Self {
182 RuntimeServiceClient {
183 client: ::grpcio::Client::new(channel),
184 }
185 }
186
187 pub fn version_opt(&self, req: &super::api::VersionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::VersionResponse> {
188 self.client.unary_call(&METHOD_RUNTIME_SERVICE_VERSION, req, opt)
189 }
190
191 pub fn version(&self, req: &super::api::VersionRequest) -> ::grpcio::Result<super::api::VersionResponse> {
192 self.version_opt(req, ::grpcio::CallOption::default())
193 }
194
195 pub fn version_async_opt(&self, req: &super::api::VersionRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::VersionResponse>> {
196 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_VERSION, req, opt)
197 }
198
199 pub fn version_async(&self, req: &super::api::VersionRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::VersionResponse>> {
200 self.version_async_opt(req, ::grpcio::CallOption::default())
201 }
202
203 pub fn run_pod_sandbox_opt(&self, req: &super::api::RunPodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::RunPodSandboxResponse> {
204 self.client.unary_call(&METHOD_RUNTIME_SERVICE_RUN_POD_SANDBOX, req, opt)
205 }
206
207 pub fn run_pod_sandbox(&self, req: &super::api::RunPodSandboxRequest) -> ::grpcio::Result<super::api::RunPodSandboxResponse> {
208 self.run_pod_sandbox_opt(req, ::grpcio::CallOption::default())
209 }
210
211 pub fn run_pod_sandbox_async_opt(&self, req: &super::api::RunPodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RunPodSandboxResponse>> {
212 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_RUN_POD_SANDBOX, req, opt)
213 }
214
215 pub fn run_pod_sandbox_async(&self, req: &super::api::RunPodSandboxRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RunPodSandboxResponse>> {
216 self.run_pod_sandbox_async_opt(req, ::grpcio::CallOption::default())
217 }
218
219 pub fn stop_pod_sandbox_opt(&self, req: &super::api::StopPodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::StopPodSandboxResponse> {
220 self.client.unary_call(&METHOD_RUNTIME_SERVICE_STOP_POD_SANDBOX, req, opt)
221 }
222
223 pub fn stop_pod_sandbox(&self, req: &super::api::StopPodSandboxRequest) -> ::grpcio::Result<super::api::StopPodSandboxResponse> {
224 self.stop_pod_sandbox_opt(req, ::grpcio::CallOption::default())
225 }
226
227 pub fn stop_pod_sandbox_async_opt(&self, req: &super::api::StopPodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StopPodSandboxResponse>> {
228 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_STOP_POD_SANDBOX, req, opt)
229 }
230
231 pub fn stop_pod_sandbox_async(&self, req: &super::api::StopPodSandboxRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StopPodSandboxResponse>> {
232 self.stop_pod_sandbox_async_opt(req, ::grpcio::CallOption::default())
233 }
234
235 pub fn remove_pod_sandbox_opt(&self, req: &super::api::RemovePodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::RemovePodSandboxResponse> {
236 self.client.unary_call(&METHOD_RUNTIME_SERVICE_REMOVE_POD_SANDBOX, req, opt)
237 }
238
239 pub fn remove_pod_sandbox(&self, req: &super::api::RemovePodSandboxRequest) -> ::grpcio::Result<super::api::RemovePodSandboxResponse> {
240 self.remove_pod_sandbox_opt(req, ::grpcio::CallOption::default())
241 }
242
243 pub fn remove_pod_sandbox_async_opt(&self, req: &super::api::RemovePodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RemovePodSandboxResponse>> {
244 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_REMOVE_POD_SANDBOX, req, opt)
245 }
246
247 pub fn remove_pod_sandbox_async(&self, req: &super::api::RemovePodSandboxRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RemovePodSandboxResponse>> {
248 self.remove_pod_sandbox_async_opt(req, ::grpcio::CallOption::default())
249 }
250
251 pub fn pod_sandbox_status_opt(&self, req: &super::api::PodSandboxStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::PodSandboxStatusResponse> {
252 self.client.unary_call(&METHOD_RUNTIME_SERVICE_POD_SANDBOX_STATUS, req, opt)
253 }
254
255 pub fn pod_sandbox_status(&self, req: &super::api::PodSandboxStatusRequest) -> ::grpcio::Result<super::api::PodSandboxStatusResponse> {
256 self.pod_sandbox_status_opt(req, ::grpcio::CallOption::default())
257 }
258
259 pub fn pod_sandbox_status_async_opt(&self, req: &super::api::PodSandboxStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::PodSandboxStatusResponse>> {
260 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_POD_SANDBOX_STATUS, req, opt)
261 }
262
263 pub fn pod_sandbox_status_async(&self, req: &super::api::PodSandboxStatusRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::PodSandboxStatusResponse>> {
264 self.pod_sandbox_status_async_opt(req, ::grpcio::CallOption::default())
265 }
266
267 pub fn list_pod_sandbox_opt(&self, req: &super::api::ListPodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ListPodSandboxResponse> {
268 self.client.unary_call(&METHOD_RUNTIME_SERVICE_LIST_POD_SANDBOX, req, opt)
269 }
270
271 pub fn list_pod_sandbox(&self, req: &super::api::ListPodSandboxRequest) -> ::grpcio::Result<super::api::ListPodSandboxResponse> {
272 self.list_pod_sandbox_opt(req, ::grpcio::CallOption::default())
273 }
274
275 pub fn list_pod_sandbox_async_opt(&self, req: &super::api::ListPodSandboxRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListPodSandboxResponse>> {
276 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_LIST_POD_SANDBOX, req, opt)
277 }
278
279 pub fn list_pod_sandbox_async(&self, req: &super::api::ListPodSandboxRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListPodSandboxResponse>> {
280 self.list_pod_sandbox_async_opt(req, ::grpcio::CallOption::default())
281 }
282
283 pub fn create_container_opt(&self, req: &super::api::CreateContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::CreateContainerResponse> {
284 self.client.unary_call(&METHOD_RUNTIME_SERVICE_CREATE_CONTAINER, req, opt)
285 }
286
287 pub fn create_container(&self, req: &super::api::CreateContainerRequest) -> ::grpcio::Result<super::api::CreateContainerResponse> {
288 self.create_container_opt(req, ::grpcio::CallOption::default())
289 }
290
291 pub fn create_container_async_opt(&self, req: &super::api::CreateContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::CreateContainerResponse>> {
292 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_CREATE_CONTAINER, req, opt)
293 }
294
295 pub fn create_container_async(&self, req: &super::api::CreateContainerRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::CreateContainerResponse>> {
296 self.create_container_async_opt(req, ::grpcio::CallOption::default())
297 }
298
299 pub fn start_container_opt(&self, req: &super::api::StartContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::StartContainerResponse> {
300 self.client.unary_call(&METHOD_RUNTIME_SERVICE_START_CONTAINER, req, opt)
301 }
302
303 pub fn start_container(&self, req: &super::api::StartContainerRequest) -> ::grpcio::Result<super::api::StartContainerResponse> {
304 self.start_container_opt(req, ::grpcio::CallOption::default())
305 }
306
307 pub fn start_container_async_opt(&self, req: &super::api::StartContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StartContainerResponse>> {
308 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_START_CONTAINER, req, opt)
309 }
310
311 pub fn start_container_async(&self, req: &super::api::StartContainerRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StartContainerResponse>> {
312 self.start_container_async_opt(req, ::grpcio::CallOption::default())
313 }
314
315 pub fn stop_container_opt(&self, req: &super::api::StopContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::StopContainerResponse> {
316 self.client.unary_call(&METHOD_RUNTIME_SERVICE_STOP_CONTAINER, req, opt)
317 }
318
319 pub fn stop_container(&self, req: &super::api::StopContainerRequest) -> ::grpcio::Result<super::api::StopContainerResponse> {
320 self.stop_container_opt(req, ::grpcio::CallOption::default())
321 }
322
323 pub fn stop_container_async_opt(&self, req: &super::api::StopContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StopContainerResponse>> {
324 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_STOP_CONTAINER, req, opt)
325 }
326
327 pub fn stop_container_async(&self, req: &super::api::StopContainerRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StopContainerResponse>> {
328 self.stop_container_async_opt(req, ::grpcio::CallOption::default())
329 }
330
331 pub fn remove_container_opt(&self, req: &super::api::RemoveContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::RemoveContainerResponse> {
332 self.client.unary_call(&METHOD_RUNTIME_SERVICE_REMOVE_CONTAINER, req, opt)
333 }
334
335 pub fn remove_container(&self, req: &super::api::RemoveContainerRequest) -> ::grpcio::Result<super::api::RemoveContainerResponse> {
336 self.remove_container_opt(req, ::grpcio::CallOption::default())
337 }
338
339 pub fn remove_container_async_opt(&self, req: &super::api::RemoveContainerRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RemoveContainerResponse>> {
340 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_REMOVE_CONTAINER, req, opt)
341 }
342
343 pub fn remove_container_async(&self, req: &super::api::RemoveContainerRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RemoveContainerResponse>> {
344 self.remove_container_async_opt(req, ::grpcio::CallOption::default())
345 }
346
347 pub fn list_containers_opt(&self, req: &super::api::ListContainersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ListContainersResponse> {
348 self.client.unary_call(&METHOD_RUNTIME_SERVICE_LIST_CONTAINERS, req, opt)
349 }
350
351 pub fn list_containers(&self, req: &super::api::ListContainersRequest) -> ::grpcio::Result<super::api::ListContainersResponse> {
352 self.list_containers_opt(req, ::grpcio::CallOption::default())
353 }
354
355 pub fn list_containers_async_opt(&self, req: &super::api::ListContainersRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListContainersResponse>> {
356 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_LIST_CONTAINERS, req, opt)
357 }
358
359 pub fn list_containers_async(&self, req: &super::api::ListContainersRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListContainersResponse>> {
360 self.list_containers_async_opt(req, ::grpcio::CallOption::default())
361 }
362
363 pub fn container_status_opt(&self, req: &super::api::ContainerStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ContainerStatusResponse> {
364 self.client.unary_call(&METHOD_RUNTIME_SERVICE_CONTAINER_STATUS, req, opt)
365 }
366
367 pub fn container_status(&self, req: &super::api::ContainerStatusRequest) -> ::grpcio::Result<super::api::ContainerStatusResponse> {
368 self.container_status_opt(req, ::grpcio::CallOption::default())
369 }
370
371 pub fn container_status_async_opt(&self, req: &super::api::ContainerStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ContainerStatusResponse>> {
372 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_CONTAINER_STATUS, req, opt)
373 }
374
375 pub fn container_status_async(&self, req: &super::api::ContainerStatusRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ContainerStatusResponse>> {
376 self.container_status_async_opt(req, ::grpcio::CallOption::default())
377 }
378
379 pub fn update_container_resources_opt(&self, req: &super::api::UpdateContainerResourcesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::UpdateContainerResourcesResponse> {
380 self.client.unary_call(&METHOD_RUNTIME_SERVICE_UPDATE_CONTAINER_RESOURCES, req, opt)
381 }
382
383 pub fn update_container_resources(&self, req: &super::api::UpdateContainerResourcesRequest) -> ::grpcio::Result<super::api::UpdateContainerResourcesResponse> {
384 self.update_container_resources_opt(req, ::grpcio::CallOption::default())
385 }
386
387 pub fn update_container_resources_async_opt(&self, req: &super::api::UpdateContainerResourcesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::UpdateContainerResourcesResponse>> {
388 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_UPDATE_CONTAINER_RESOURCES, req, opt)
389 }
390
391 pub fn update_container_resources_async(&self, req: &super::api::UpdateContainerResourcesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::UpdateContainerResourcesResponse>> {
392 self.update_container_resources_async_opt(req, ::grpcio::CallOption::default())
393 }
394
395 pub fn reopen_container_log_opt(&self, req: &super::api::ReopenContainerLogRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ReopenContainerLogResponse> {
396 self.client.unary_call(&METHOD_RUNTIME_SERVICE_REOPEN_CONTAINER_LOG, req, opt)
397 }
398
399 pub fn reopen_container_log(&self, req: &super::api::ReopenContainerLogRequest) -> ::grpcio::Result<super::api::ReopenContainerLogResponse> {
400 self.reopen_container_log_opt(req, ::grpcio::CallOption::default())
401 }
402
403 pub fn reopen_container_log_async_opt(&self, req: &super::api::ReopenContainerLogRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ReopenContainerLogResponse>> {
404 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_REOPEN_CONTAINER_LOG, req, opt)
405 }
406
407 pub fn reopen_container_log_async(&self, req: &super::api::ReopenContainerLogRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ReopenContainerLogResponse>> {
408 self.reopen_container_log_async_opt(req, ::grpcio::CallOption::default())
409 }
410
411 pub fn exec_sync_opt(&self, req: &super::api::ExecSyncRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ExecSyncResponse> {
412 self.client.unary_call(&METHOD_RUNTIME_SERVICE_EXEC_SYNC, req, opt)
413 }
414
415 pub fn exec_sync(&self, req: &super::api::ExecSyncRequest) -> ::grpcio::Result<super::api::ExecSyncResponse> {
416 self.exec_sync_opt(req, ::grpcio::CallOption::default())
417 }
418
419 pub fn exec_sync_async_opt(&self, req: &super::api::ExecSyncRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ExecSyncResponse>> {
420 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_EXEC_SYNC, req, opt)
421 }
422
423 pub fn exec_sync_async(&self, req: &super::api::ExecSyncRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ExecSyncResponse>> {
424 self.exec_sync_async_opt(req, ::grpcio::CallOption::default())
425 }
426
427 pub fn exec_opt(&self, req: &super::api::ExecRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ExecResponse> {
428 self.client.unary_call(&METHOD_RUNTIME_SERVICE_EXEC, req, opt)
429 }
430
431 pub fn exec(&self, req: &super::api::ExecRequest) -> ::grpcio::Result<super::api::ExecResponse> {
432 self.exec_opt(req, ::grpcio::CallOption::default())
433 }
434
435 pub fn exec_async_opt(&self, req: &super::api::ExecRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ExecResponse>> {
436 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_EXEC, req, opt)
437 }
438
439 pub fn exec_async(&self, req: &super::api::ExecRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ExecResponse>> {
440 self.exec_async_opt(req, ::grpcio::CallOption::default())
441 }
442
443 pub fn attach_opt(&self, req: &super::api::AttachRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::AttachResponse> {
444 self.client.unary_call(&METHOD_RUNTIME_SERVICE_ATTACH, req, opt)
445 }
446
447 pub fn attach(&self, req: &super::api::AttachRequest) -> ::grpcio::Result<super::api::AttachResponse> {
448 self.attach_opt(req, ::grpcio::CallOption::default())
449 }
450
451 pub fn attach_async_opt(&self, req: &super::api::AttachRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::AttachResponse>> {
452 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_ATTACH, req, opt)
453 }
454
455 pub fn attach_async(&self, req: &super::api::AttachRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::AttachResponse>> {
456 self.attach_async_opt(req, ::grpcio::CallOption::default())
457 }
458
459 pub fn port_forward_opt(&self, req: &super::api::PortForwardRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::PortForwardResponse> {
460 self.client.unary_call(&METHOD_RUNTIME_SERVICE_PORT_FORWARD, req, opt)
461 }
462
463 pub fn port_forward(&self, req: &super::api::PortForwardRequest) -> ::grpcio::Result<super::api::PortForwardResponse> {
464 self.port_forward_opt(req, ::grpcio::CallOption::default())
465 }
466
467 pub fn port_forward_async_opt(&self, req: &super::api::PortForwardRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::PortForwardResponse>> {
468 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_PORT_FORWARD, req, opt)
469 }
470
471 pub fn port_forward_async(&self, req: &super::api::PortForwardRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::PortForwardResponse>> {
472 self.port_forward_async_opt(req, ::grpcio::CallOption::default())
473 }
474
475 pub fn container_stats_opt(&self, req: &super::api::ContainerStatsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ContainerStatsResponse> {
476 self.client.unary_call(&METHOD_RUNTIME_SERVICE_CONTAINER_STATS, req, opt)
477 }
478
479 pub fn container_stats(&self, req: &super::api::ContainerStatsRequest) -> ::grpcio::Result<super::api::ContainerStatsResponse> {
480 self.container_stats_opt(req, ::grpcio::CallOption::default())
481 }
482
483 pub fn container_stats_async_opt(&self, req: &super::api::ContainerStatsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ContainerStatsResponse>> {
484 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_CONTAINER_STATS, req, opt)
485 }
486
487 pub fn container_stats_async(&self, req: &super::api::ContainerStatsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ContainerStatsResponse>> {
488 self.container_stats_async_opt(req, ::grpcio::CallOption::default())
489 }
490
491 pub fn list_container_stats_opt(&self, req: &super::api::ListContainerStatsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ListContainerStatsResponse> {
492 self.client.unary_call(&METHOD_RUNTIME_SERVICE_LIST_CONTAINER_STATS, req, opt)
493 }
494
495 pub fn list_container_stats(&self, req: &super::api::ListContainerStatsRequest) -> ::grpcio::Result<super::api::ListContainerStatsResponse> {
496 self.list_container_stats_opt(req, ::grpcio::CallOption::default())
497 }
498
499 pub fn list_container_stats_async_opt(&self, req: &super::api::ListContainerStatsRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListContainerStatsResponse>> {
500 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_LIST_CONTAINER_STATS, req, opt)
501 }
502
503 pub fn list_container_stats_async(&self, req: &super::api::ListContainerStatsRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListContainerStatsResponse>> {
504 self.list_container_stats_async_opt(req, ::grpcio::CallOption::default())
505 }
506
507 pub fn update_runtime_config_opt(&self, req: &super::api::UpdateRuntimeConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::UpdateRuntimeConfigResponse> {
508 self.client.unary_call(&METHOD_RUNTIME_SERVICE_UPDATE_RUNTIME_CONFIG, req, opt)
509 }
510
511 pub fn update_runtime_config(&self, req: &super::api::UpdateRuntimeConfigRequest) -> ::grpcio::Result<super::api::UpdateRuntimeConfigResponse> {
512 self.update_runtime_config_opt(req, ::grpcio::CallOption::default())
513 }
514
515 pub fn update_runtime_config_async_opt(&self, req: &super::api::UpdateRuntimeConfigRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::UpdateRuntimeConfigResponse>> {
516 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_UPDATE_RUNTIME_CONFIG, req, opt)
517 }
518
519 pub fn update_runtime_config_async(&self, req: &super::api::UpdateRuntimeConfigRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::UpdateRuntimeConfigResponse>> {
520 self.update_runtime_config_async_opt(req, ::grpcio::CallOption::default())
521 }
522
523 pub fn status_opt(&self, req: &super::api::StatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::StatusResponse> {
524 self.client.unary_call(&METHOD_RUNTIME_SERVICE_STATUS, req, opt)
525 }
526
527 pub fn status(&self, req: &super::api::StatusRequest) -> ::grpcio::Result<super::api::StatusResponse> {
528 self.status_opt(req, ::grpcio::CallOption::default())
529 }
530
531 pub fn status_async_opt(&self, req: &super::api::StatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StatusResponse>> {
532 self.client.unary_call_async(&METHOD_RUNTIME_SERVICE_STATUS, req, opt)
533 }
534
535 pub fn status_async(&self, req: &super::api::StatusRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::StatusResponse>> {
536 self.status_async_opt(req, ::grpcio::CallOption::default())
537 }
538 pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Output = ()> + Send + 'static {
539 self.client.spawn(f)
540 }
541}
542
543pub trait RuntimeService {
544 fn version(&mut self, ctx: ::grpcio::RpcContext, req: super::api::VersionRequest, sink: ::grpcio::UnarySink<super::api::VersionResponse>);
545 fn run_pod_sandbox(&mut self, ctx: ::grpcio::RpcContext, req: super::api::RunPodSandboxRequest, sink: ::grpcio::UnarySink<super::api::RunPodSandboxResponse>);
546 fn stop_pod_sandbox(&mut self, ctx: ::grpcio::RpcContext, req: super::api::StopPodSandboxRequest, sink: ::grpcio::UnarySink<super::api::StopPodSandboxResponse>);
547 fn remove_pod_sandbox(&mut self, ctx: ::grpcio::RpcContext, req: super::api::RemovePodSandboxRequest, sink: ::grpcio::UnarySink<super::api::RemovePodSandboxResponse>);
548 fn pod_sandbox_status(&mut self, ctx: ::grpcio::RpcContext, req: super::api::PodSandboxStatusRequest, sink: ::grpcio::UnarySink<super::api::PodSandboxStatusResponse>);
549 fn list_pod_sandbox(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ListPodSandboxRequest, sink: ::grpcio::UnarySink<super::api::ListPodSandboxResponse>);
550 fn create_container(&mut self, ctx: ::grpcio::RpcContext, req: super::api::CreateContainerRequest, sink: ::grpcio::UnarySink<super::api::CreateContainerResponse>);
551 fn start_container(&mut self, ctx: ::grpcio::RpcContext, req: super::api::StartContainerRequest, sink: ::grpcio::UnarySink<super::api::StartContainerResponse>);
552 fn stop_container(&mut self, ctx: ::grpcio::RpcContext, req: super::api::StopContainerRequest, sink: ::grpcio::UnarySink<super::api::StopContainerResponse>);
553 fn remove_container(&mut self, ctx: ::grpcio::RpcContext, req: super::api::RemoveContainerRequest, sink: ::grpcio::UnarySink<super::api::RemoveContainerResponse>);
554 fn list_containers(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ListContainersRequest, sink: ::grpcio::UnarySink<super::api::ListContainersResponse>);
555 fn container_status(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ContainerStatusRequest, sink: ::grpcio::UnarySink<super::api::ContainerStatusResponse>);
556 fn update_container_resources(&mut self, ctx: ::grpcio::RpcContext, req: super::api::UpdateContainerResourcesRequest, sink: ::grpcio::UnarySink<super::api::UpdateContainerResourcesResponse>);
557 fn reopen_container_log(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ReopenContainerLogRequest, sink: ::grpcio::UnarySink<super::api::ReopenContainerLogResponse>);
558 fn exec_sync(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ExecSyncRequest, sink: ::grpcio::UnarySink<super::api::ExecSyncResponse>);
559 fn exec(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ExecRequest, sink: ::grpcio::UnarySink<super::api::ExecResponse>);
560 fn attach(&mut self, ctx: ::grpcio::RpcContext, req: super::api::AttachRequest, sink: ::grpcio::UnarySink<super::api::AttachResponse>);
561 fn port_forward(&mut self, ctx: ::grpcio::RpcContext, req: super::api::PortForwardRequest, sink: ::grpcio::UnarySink<super::api::PortForwardResponse>);
562 fn container_stats(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ContainerStatsRequest, sink: ::grpcio::UnarySink<super::api::ContainerStatsResponse>);
563 fn list_container_stats(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ListContainerStatsRequest, sink: ::grpcio::UnarySink<super::api::ListContainerStatsResponse>);
564 fn update_runtime_config(&mut self, ctx: ::grpcio::RpcContext, req: super::api::UpdateRuntimeConfigRequest, sink: ::grpcio::UnarySink<super::api::UpdateRuntimeConfigResponse>);
565 fn status(&mut self, ctx: ::grpcio::RpcContext, req: super::api::StatusRequest, sink: ::grpcio::UnarySink<super::api::StatusResponse>);
566}
567
568pub fn create_runtime_service<S: RuntimeService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
569 let mut builder = ::grpcio::ServiceBuilder::new();
570 let mut instance = s.clone();
571 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_VERSION, move |ctx, req, resp| {
572 instance.version(ctx, req, resp)
573 });
574 let mut instance = s.clone();
575 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_RUN_POD_SANDBOX, move |ctx, req, resp| {
576 instance.run_pod_sandbox(ctx, req, resp)
577 });
578 let mut instance = s.clone();
579 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_STOP_POD_SANDBOX, move |ctx, req, resp| {
580 instance.stop_pod_sandbox(ctx, req, resp)
581 });
582 let mut instance = s.clone();
583 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_REMOVE_POD_SANDBOX, move |ctx, req, resp| {
584 instance.remove_pod_sandbox(ctx, req, resp)
585 });
586 let mut instance = s.clone();
587 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_POD_SANDBOX_STATUS, move |ctx, req, resp| {
588 instance.pod_sandbox_status(ctx, req, resp)
589 });
590 let mut instance = s.clone();
591 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_LIST_POD_SANDBOX, move |ctx, req, resp| {
592 instance.list_pod_sandbox(ctx, req, resp)
593 });
594 let mut instance = s.clone();
595 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_CREATE_CONTAINER, move |ctx, req, resp| {
596 instance.create_container(ctx, req, resp)
597 });
598 let mut instance = s.clone();
599 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_START_CONTAINER, move |ctx, req, resp| {
600 instance.start_container(ctx, req, resp)
601 });
602 let mut instance = s.clone();
603 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_STOP_CONTAINER, move |ctx, req, resp| {
604 instance.stop_container(ctx, req, resp)
605 });
606 let mut instance = s.clone();
607 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_REMOVE_CONTAINER, move |ctx, req, resp| {
608 instance.remove_container(ctx, req, resp)
609 });
610 let mut instance = s.clone();
611 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_LIST_CONTAINERS, move |ctx, req, resp| {
612 instance.list_containers(ctx, req, resp)
613 });
614 let mut instance = s.clone();
615 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_CONTAINER_STATUS, move |ctx, req, resp| {
616 instance.container_status(ctx, req, resp)
617 });
618 let mut instance = s.clone();
619 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_UPDATE_CONTAINER_RESOURCES, move |ctx, req, resp| {
620 instance.update_container_resources(ctx, req, resp)
621 });
622 let mut instance = s.clone();
623 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_REOPEN_CONTAINER_LOG, move |ctx, req, resp| {
624 instance.reopen_container_log(ctx, req, resp)
625 });
626 let mut instance = s.clone();
627 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_EXEC_SYNC, move |ctx, req, resp| {
628 instance.exec_sync(ctx, req, resp)
629 });
630 let mut instance = s.clone();
631 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_EXEC, move |ctx, req, resp| {
632 instance.exec(ctx, req, resp)
633 });
634 let mut instance = s.clone();
635 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_ATTACH, move |ctx, req, resp| {
636 instance.attach(ctx, req, resp)
637 });
638 let mut instance = s.clone();
639 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_PORT_FORWARD, move |ctx, req, resp| {
640 instance.port_forward(ctx, req, resp)
641 });
642 let mut instance = s.clone();
643 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_CONTAINER_STATS, move |ctx, req, resp| {
644 instance.container_stats(ctx, req, resp)
645 });
646 let mut instance = s.clone();
647 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_LIST_CONTAINER_STATS, move |ctx, req, resp| {
648 instance.list_container_stats(ctx, req, resp)
649 });
650 let mut instance = s.clone();
651 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_UPDATE_RUNTIME_CONFIG, move |ctx, req, resp| {
652 instance.update_runtime_config(ctx, req, resp)
653 });
654 let mut instance = s;
655 builder = builder.add_unary_handler(&METHOD_RUNTIME_SERVICE_STATUS, move |ctx, req, resp| {
656 instance.status(ctx, req, resp)
657 });
658 builder.build()
659}
660
661const METHOD_IMAGE_SERVICE_LIST_IMAGES: ::grpcio::Method<super::api::ListImagesRequest, super::api::ListImagesResponse> = ::grpcio::Method {
662 ty: ::grpcio::MethodType::Unary,
663 name: "/runtime.v1alpha2.ImageService/ListImages",
664 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
665 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
666};
667
668const METHOD_IMAGE_SERVICE_IMAGE_STATUS: ::grpcio::Method<super::api::ImageStatusRequest, super::api::ImageStatusResponse> = ::grpcio::Method {
669 ty: ::grpcio::MethodType::Unary,
670 name: "/runtime.v1alpha2.ImageService/ImageStatus",
671 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
672 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
673};
674
675const METHOD_IMAGE_SERVICE_PULL_IMAGE: ::grpcio::Method<super::api::PullImageRequest, super::api::PullImageResponse> = ::grpcio::Method {
676 ty: ::grpcio::MethodType::Unary,
677 name: "/runtime.v1alpha2.ImageService/PullImage",
678 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
679 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
680};
681
682const METHOD_IMAGE_SERVICE_REMOVE_IMAGE: ::grpcio::Method<super::api::RemoveImageRequest, super::api::RemoveImageResponse> = ::grpcio::Method {
683 ty: ::grpcio::MethodType::Unary,
684 name: "/runtime.v1alpha2.ImageService/RemoveImage",
685 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
686 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
687};
688
689const METHOD_IMAGE_SERVICE_IMAGE_FS_INFO: ::grpcio::Method<super::api::ImageFsInfoRequest, super::api::ImageFsInfoResponse> = ::grpcio::Method {
690 ty: ::grpcio::MethodType::Unary,
691 name: "/runtime.v1alpha2.ImageService/ImageFsInfo",
692 req_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
693 resp_mar: ::grpcio::Marshaller { ser: ::grpcio::pb_ser, de: ::grpcio::pb_de },
694};
695
696#[derive(Clone)]
697pub struct ImageServiceClient {
698 client: ::grpcio::Client,
699}
700
701impl ImageServiceClient {
702 pub fn new(channel: ::grpcio::Channel) -> Self {
703 ImageServiceClient {
704 client: ::grpcio::Client::new(channel),
705 }
706 }
707
708 pub fn list_images_opt(&self, req: &super::api::ListImagesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ListImagesResponse> {
709 self.client.unary_call(&METHOD_IMAGE_SERVICE_LIST_IMAGES, req, opt)
710 }
711
712 pub fn list_images(&self, req: &super::api::ListImagesRequest) -> ::grpcio::Result<super::api::ListImagesResponse> {
713 self.list_images_opt(req, ::grpcio::CallOption::default())
714 }
715
716 pub fn list_images_async_opt(&self, req: &super::api::ListImagesRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListImagesResponse>> {
717 self.client.unary_call_async(&METHOD_IMAGE_SERVICE_LIST_IMAGES, req, opt)
718 }
719
720 pub fn list_images_async(&self, req: &super::api::ListImagesRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ListImagesResponse>> {
721 self.list_images_async_opt(req, ::grpcio::CallOption::default())
722 }
723
724 pub fn image_status_opt(&self, req: &super::api::ImageStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ImageStatusResponse> {
725 self.client.unary_call(&METHOD_IMAGE_SERVICE_IMAGE_STATUS, req, opt)
726 }
727
728 pub fn image_status(&self, req: &super::api::ImageStatusRequest) -> ::grpcio::Result<super::api::ImageStatusResponse> {
729 self.image_status_opt(req, ::grpcio::CallOption::default())
730 }
731
732 pub fn image_status_async_opt(&self, req: &super::api::ImageStatusRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ImageStatusResponse>> {
733 self.client.unary_call_async(&METHOD_IMAGE_SERVICE_IMAGE_STATUS, req, opt)
734 }
735
736 pub fn image_status_async(&self, req: &super::api::ImageStatusRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ImageStatusResponse>> {
737 self.image_status_async_opt(req, ::grpcio::CallOption::default())
738 }
739
740 pub fn pull_image_opt(&self, req: &super::api::PullImageRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::PullImageResponse> {
741 self.client.unary_call(&METHOD_IMAGE_SERVICE_PULL_IMAGE, req, opt)
742 }
743
744 pub fn pull_image(&self, req: &super::api::PullImageRequest) -> ::grpcio::Result<super::api::PullImageResponse> {
745 self.pull_image_opt(req, ::grpcio::CallOption::default())
746 }
747
748 pub fn pull_image_async_opt(&self, req: &super::api::PullImageRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::PullImageResponse>> {
749 self.client.unary_call_async(&METHOD_IMAGE_SERVICE_PULL_IMAGE, req, opt)
750 }
751
752 pub fn pull_image_async(&self, req: &super::api::PullImageRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::PullImageResponse>> {
753 self.pull_image_async_opt(req, ::grpcio::CallOption::default())
754 }
755
756 pub fn remove_image_opt(&self, req: &super::api::RemoveImageRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::RemoveImageResponse> {
757 self.client.unary_call(&METHOD_IMAGE_SERVICE_REMOVE_IMAGE, req, opt)
758 }
759
760 pub fn remove_image(&self, req: &super::api::RemoveImageRequest) -> ::grpcio::Result<super::api::RemoveImageResponse> {
761 self.remove_image_opt(req, ::grpcio::CallOption::default())
762 }
763
764 pub fn remove_image_async_opt(&self, req: &super::api::RemoveImageRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RemoveImageResponse>> {
765 self.client.unary_call_async(&METHOD_IMAGE_SERVICE_REMOVE_IMAGE, req, opt)
766 }
767
768 pub fn remove_image_async(&self, req: &super::api::RemoveImageRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::RemoveImageResponse>> {
769 self.remove_image_async_opt(req, ::grpcio::CallOption::default())
770 }
771
772 pub fn image_fs_info_opt(&self, req: &super::api::ImageFsInfoRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<super::api::ImageFsInfoResponse> {
773 self.client.unary_call(&METHOD_IMAGE_SERVICE_IMAGE_FS_INFO, req, opt)
774 }
775
776 pub fn image_fs_info(&self, req: &super::api::ImageFsInfoRequest) -> ::grpcio::Result<super::api::ImageFsInfoResponse> {
777 self.image_fs_info_opt(req, ::grpcio::CallOption::default())
778 }
779
780 pub fn image_fs_info_async_opt(&self, req: &super::api::ImageFsInfoRequest, opt: ::grpcio::CallOption) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ImageFsInfoResponse>> {
781 self.client.unary_call_async(&METHOD_IMAGE_SERVICE_IMAGE_FS_INFO, req, opt)
782 }
783
784 pub fn image_fs_info_async(&self, req: &super::api::ImageFsInfoRequest) -> ::grpcio::Result<::grpcio::ClientUnaryReceiver<super::api::ImageFsInfoResponse>> {
785 self.image_fs_info_async_opt(req, ::grpcio::CallOption::default())
786 }
787 pub fn spawn<F>(&self, f: F) where F: ::futures::Future<Output = ()> + Send + 'static {
788 self.client.spawn(f)
789 }
790}
791
792pub trait ImageService {
793 fn list_images(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ListImagesRequest, sink: ::grpcio::UnarySink<super::api::ListImagesResponse>);
794 fn image_status(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ImageStatusRequest, sink: ::grpcio::UnarySink<super::api::ImageStatusResponse>);
795 fn pull_image(&mut self, ctx: ::grpcio::RpcContext, req: super::api::PullImageRequest, sink: ::grpcio::UnarySink<super::api::PullImageResponse>);
796 fn remove_image(&mut self, ctx: ::grpcio::RpcContext, req: super::api::RemoveImageRequest, sink: ::grpcio::UnarySink<super::api::RemoveImageResponse>);
797 fn image_fs_info(&mut self, ctx: ::grpcio::RpcContext, req: super::api::ImageFsInfoRequest, sink: ::grpcio::UnarySink<super::api::ImageFsInfoResponse>);
798}
799
800pub fn create_image_service<S: ImageService + Send + Clone + 'static>(s: S) -> ::grpcio::Service {
801 let mut builder = ::grpcio::ServiceBuilder::new();
802 let mut instance = s.clone();
803 builder = builder.add_unary_handler(&METHOD_IMAGE_SERVICE_LIST_IMAGES, move |ctx, req, resp| {
804 instance.list_images(ctx, req, resp)
805 });
806 let mut instance = s.clone();
807 builder = builder.add_unary_handler(&METHOD_IMAGE_SERVICE_IMAGE_STATUS, move |ctx, req, resp| {
808 instance.image_status(ctx, req, resp)
809 });
810 let mut instance = s.clone();
811 builder = builder.add_unary_handler(&METHOD_IMAGE_SERVICE_PULL_IMAGE, move |ctx, req, resp| {
812 instance.pull_image(ctx, req, resp)
813 });
814 let mut instance = s.clone();
815 builder = builder.add_unary_handler(&METHOD_IMAGE_SERVICE_REMOVE_IMAGE, move |ctx, req, resp| {
816 instance.remove_image(ctx, req, resp)
817 });
818 let mut instance = s;
819 builder = builder.add_unary_handler(&METHOD_IMAGE_SERVICE_IMAGE_FS_INFO, move |ctx, req, resp| {
820 instance.image_fs_info(ctx, req, resp)
821 });
822 builder.build()
823}