Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go
2496 views
1
// Copyright (c) 2024 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
6
// versions:
7
// - protoc-gen-go-grpc v1.2.0
8
// - protoc v3.20.1
9
// source: workspace_daemon.proto
10
11
package api
12
13
import (
14
context "context"
15
grpc "google.golang.org/grpc"
16
codes "google.golang.org/grpc/codes"
17
status "google.golang.org/grpc/status"
18
)
19
20
// This is a compile-time assertion to ensure that this generated file
21
// is compatible with the grpc package it is being compiled against.
22
// Requires gRPC-Go v1.32.0 or later.
23
const _ = grpc.SupportPackageIsVersion7
24
25
// InWorkspaceServiceClient is the client API for InWorkspaceService service.
26
//
27
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
28
type InWorkspaceServiceClient interface {
29
// PrepareForUserNS prepares a workspace container for wrapping it in a user namespace.
30
// A container that called this function MUST call Teardown.
31
//
32
// This call will make the workspace container's rootfs shared, and mount the workspace
33
// container's rootfs as a shiftfs mark under `/.workspace/mark` if the workspace has
34
// the daemon hostPath mount. Can only be used once per workspace.
35
PrepareForUserNS(ctx context.Context, in *PrepareForUserNSRequest, opts ...grpc.CallOption) (*PrepareForUserNSResponse, error)
36
// WriteIDMapping writes a new user/group ID mapping to /proc/<pid>/uid_map (gid_map respectively). This is used
37
// for user namespaces and is available four times every 10 seconds.
38
WriteIDMapping(ctx context.Context, in *WriteIDMappingRequest, opts ...grpc.CallOption) (*WriteIDMappingResponse, error)
39
// EvacuateCGroup empties the workspace pod cgroup and produces a new substructure.
40
// In combincation with introducing a new cgroup namespace, we can create a situation
41
// where the subcontroller are enabled and the ring2-visible cgroup is of type "domain".
42
EvacuateCGroup(ctx context.Context, in *EvacuateCGroupRequest, opts ...grpc.CallOption) (*EvacuateCGroupResponse, error)
43
// MountProc mounts a masked proc in the container's rootfs.
44
// The PID must be in the PID namespace of the workspace container.
45
// The path is relative to the mount namespace of the PID.
46
MountProc(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error)
47
// UmountProc unmounts a masked proc from the container's rootfs.
48
// The PID must be in the PID namespace of the workspace container.
49
// The path is relative to the mount namespace of the PID.
50
UmountProc(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error)
51
// MountSysfs mounts a masked sysfs in the container's rootfs.
52
// The PID must be in the PID namespace of the workspace container.
53
// The path is relative to the mount namespace of the PID.
54
MountSysfs(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error)
55
// UmountSysfs unmounts a masked sysfs from the container's rootfs.
56
// The PID must be in the PID namespace of the workspace container.
57
// The path is relative to the mount namespace of the PID.
58
UmountSysfs(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error)
59
// MountNfs mounts a nfs share into the container's rootfs.
60
// The PID must be in the PID namespace of the workspace container.
61
// The path is relative to the mount namespace of the PID.
62
MountNfs(ctx context.Context, in *MountNfsRequest, opts ...grpc.CallOption) (*MountNfsResponse, error)
63
// UmountNfs unmounts a nfs share from the container's rootfs.
64
// The PID must be in the PID namespace of the workspace container.
65
// The path is relative to the mount namespace of the PID.
66
UmountNfs(ctx context.Context, in *UmountNfsRequest, opts ...grpc.CallOption) (*UmountNfsResponse, error)
67
// Teardown prepares workspace content backups and unmounts shiftfs mounts. The canary is supposed to be triggered
68
// when the workspace is about to shut down, e.g. using the PreStop hook of a Kubernetes container.
69
Teardown(ctx context.Context, in *TeardownRequest, opts ...grpc.CallOption) (*TeardownResponse, error)
70
// WipingTeardown undoes everything PrepareForUserNS does, especially unmounts shiftfs mounts
71
WipingTeardown(ctx context.Context, in *WipingTeardownRequest, opts ...grpc.CallOption) (*WipingTeardownResponse, error)
72
// Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace.
73
SetupPairVeths(ctx context.Context, in *SetupPairVethsRequest, opts ...grpc.CallOption) (*SetupPairVethsResponse, error)
74
// Get information about the workspace
75
WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error)
76
}
77
78
type inWorkspaceServiceClient struct {
79
cc grpc.ClientConnInterface
80
}
81
82
func NewInWorkspaceServiceClient(cc grpc.ClientConnInterface) InWorkspaceServiceClient {
83
return &inWorkspaceServiceClient{cc}
84
}
85
86
func (c *inWorkspaceServiceClient) PrepareForUserNS(ctx context.Context, in *PrepareForUserNSRequest, opts ...grpc.CallOption) (*PrepareForUserNSResponse, error) {
87
out := new(PrepareForUserNSResponse)
88
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/PrepareForUserNS", in, out, opts...)
89
if err != nil {
90
return nil, err
91
}
92
return out, nil
93
}
94
95
func (c *inWorkspaceServiceClient) WriteIDMapping(ctx context.Context, in *WriteIDMappingRequest, opts ...grpc.CallOption) (*WriteIDMappingResponse, error) {
96
out := new(WriteIDMappingResponse)
97
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/WriteIDMapping", in, out, opts...)
98
if err != nil {
99
return nil, err
100
}
101
return out, nil
102
}
103
104
func (c *inWorkspaceServiceClient) EvacuateCGroup(ctx context.Context, in *EvacuateCGroupRequest, opts ...grpc.CallOption) (*EvacuateCGroupResponse, error) {
105
out := new(EvacuateCGroupResponse)
106
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/EvacuateCGroup", in, out, opts...)
107
if err != nil {
108
return nil, err
109
}
110
return out, nil
111
}
112
113
func (c *inWorkspaceServiceClient) MountProc(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error) {
114
out := new(MountProcResponse)
115
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/MountProc", in, out, opts...)
116
if err != nil {
117
return nil, err
118
}
119
return out, nil
120
}
121
122
func (c *inWorkspaceServiceClient) UmountProc(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error) {
123
out := new(UmountProcResponse)
124
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/UmountProc", in, out, opts...)
125
if err != nil {
126
return nil, err
127
}
128
return out, nil
129
}
130
131
func (c *inWorkspaceServiceClient) MountSysfs(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error) {
132
out := new(MountProcResponse)
133
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/MountSysfs", in, out, opts...)
134
if err != nil {
135
return nil, err
136
}
137
return out, nil
138
}
139
140
func (c *inWorkspaceServiceClient) UmountSysfs(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error) {
141
out := new(UmountProcResponse)
142
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/UmountSysfs", in, out, opts...)
143
if err != nil {
144
return nil, err
145
}
146
return out, nil
147
}
148
149
func (c *inWorkspaceServiceClient) MountNfs(ctx context.Context, in *MountNfsRequest, opts ...grpc.CallOption) (*MountNfsResponse, error) {
150
out := new(MountNfsResponse)
151
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/MountNfs", in, out, opts...)
152
if err != nil {
153
return nil, err
154
}
155
return out, nil
156
}
157
158
func (c *inWorkspaceServiceClient) UmountNfs(ctx context.Context, in *UmountNfsRequest, opts ...grpc.CallOption) (*UmountNfsResponse, error) {
159
out := new(UmountNfsResponse)
160
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/UmountNfs", in, out, opts...)
161
if err != nil {
162
return nil, err
163
}
164
return out, nil
165
}
166
167
func (c *inWorkspaceServiceClient) Teardown(ctx context.Context, in *TeardownRequest, opts ...grpc.CallOption) (*TeardownResponse, error) {
168
out := new(TeardownResponse)
169
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/Teardown", in, out, opts...)
170
if err != nil {
171
return nil, err
172
}
173
return out, nil
174
}
175
176
func (c *inWorkspaceServiceClient) WipingTeardown(ctx context.Context, in *WipingTeardownRequest, opts ...grpc.CallOption) (*WipingTeardownResponse, error) {
177
out := new(WipingTeardownResponse)
178
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/WipingTeardown", in, out, opts...)
179
if err != nil {
180
return nil, err
181
}
182
return out, nil
183
}
184
185
func (c *inWorkspaceServiceClient) SetupPairVeths(ctx context.Context, in *SetupPairVethsRequest, opts ...grpc.CallOption) (*SetupPairVethsResponse, error) {
186
out := new(SetupPairVethsResponse)
187
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/SetupPairVeths", in, out, opts...)
188
if err != nil {
189
return nil, err
190
}
191
return out, nil
192
}
193
194
func (c *inWorkspaceServiceClient) WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error) {
195
out := new(WorkspaceInfoResponse)
196
err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/WorkspaceInfo", in, out, opts...)
197
if err != nil {
198
return nil, err
199
}
200
return out, nil
201
}
202
203
// InWorkspaceServiceServer is the server API for InWorkspaceService service.
204
// All implementations must embed UnimplementedInWorkspaceServiceServer
205
// for forward compatibility
206
type InWorkspaceServiceServer interface {
207
// PrepareForUserNS prepares a workspace container for wrapping it in a user namespace.
208
// A container that called this function MUST call Teardown.
209
//
210
// This call will make the workspace container's rootfs shared, and mount the workspace
211
// container's rootfs as a shiftfs mark under `/.workspace/mark` if the workspace has
212
// the daemon hostPath mount. Can only be used once per workspace.
213
PrepareForUserNS(context.Context, *PrepareForUserNSRequest) (*PrepareForUserNSResponse, error)
214
// WriteIDMapping writes a new user/group ID mapping to /proc/<pid>/uid_map (gid_map respectively). This is used
215
// for user namespaces and is available four times every 10 seconds.
216
WriteIDMapping(context.Context, *WriteIDMappingRequest) (*WriteIDMappingResponse, error)
217
// EvacuateCGroup empties the workspace pod cgroup and produces a new substructure.
218
// In combincation with introducing a new cgroup namespace, we can create a situation
219
// where the subcontroller are enabled and the ring2-visible cgroup is of type "domain".
220
EvacuateCGroup(context.Context, *EvacuateCGroupRequest) (*EvacuateCGroupResponse, error)
221
// MountProc mounts a masked proc in the container's rootfs.
222
// The PID must be in the PID namespace of the workspace container.
223
// The path is relative to the mount namespace of the PID.
224
MountProc(context.Context, *MountProcRequest) (*MountProcResponse, error)
225
// UmountProc unmounts a masked proc from the container's rootfs.
226
// The PID must be in the PID namespace of the workspace container.
227
// The path is relative to the mount namespace of the PID.
228
UmountProc(context.Context, *UmountProcRequest) (*UmountProcResponse, error)
229
// MountSysfs mounts a masked sysfs in the container's rootfs.
230
// The PID must be in the PID namespace of the workspace container.
231
// The path is relative to the mount namespace of the PID.
232
MountSysfs(context.Context, *MountProcRequest) (*MountProcResponse, error)
233
// UmountSysfs unmounts a masked sysfs from the container's rootfs.
234
// The PID must be in the PID namespace of the workspace container.
235
// The path is relative to the mount namespace of the PID.
236
UmountSysfs(context.Context, *UmountProcRequest) (*UmountProcResponse, error)
237
// MountNfs mounts a nfs share into the container's rootfs.
238
// The PID must be in the PID namespace of the workspace container.
239
// The path is relative to the mount namespace of the PID.
240
MountNfs(context.Context, *MountNfsRequest) (*MountNfsResponse, error)
241
// UmountNfs unmounts a nfs share from the container's rootfs.
242
// The PID must be in the PID namespace of the workspace container.
243
// The path is relative to the mount namespace of the PID.
244
UmountNfs(context.Context, *UmountNfsRequest) (*UmountNfsResponse, error)
245
// Teardown prepares workspace content backups and unmounts shiftfs mounts. The canary is supposed to be triggered
246
// when the workspace is about to shut down, e.g. using the PreStop hook of a Kubernetes container.
247
Teardown(context.Context, *TeardownRequest) (*TeardownResponse, error)
248
// WipingTeardown undoes everything PrepareForUserNS does, especially unmounts shiftfs mounts
249
WipingTeardown(context.Context, *WipingTeardownRequest) (*WipingTeardownResponse, error)
250
// Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace.
251
SetupPairVeths(context.Context, *SetupPairVethsRequest) (*SetupPairVethsResponse, error)
252
// Get information about the workspace
253
WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error)
254
mustEmbedUnimplementedInWorkspaceServiceServer()
255
}
256
257
// UnimplementedInWorkspaceServiceServer must be embedded to have forward compatible implementations.
258
type UnimplementedInWorkspaceServiceServer struct {
259
}
260
261
func (UnimplementedInWorkspaceServiceServer) PrepareForUserNS(context.Context, *PrepareForUserNSRequest) (*PrepareForUserNSResponse, error) {
262
return nil, status.Errorf(codes.Unimplemented, "method PrepareForUserNS not implemented")
263
}
264
func (UnimplementedInWorkspaceServiceServer) WriteIDMapping(context.Context, *WriteIDMappingRequest) (*WriteIDMappingResponse, error) {
265
return nil, status.Errorf(codes.Unimplemented, "method WriteIDMapping not implemented")
266
}
267
func (UnimplementedInWorkspaceServiceServer) EvacuateCGroup(context.Context, *EvacuateCGroupRequest) (*EvacuateCGroupResponse, error) {
268
return nil, status.Errorf(codes.Unimplemented, "method EvacuateCGroup not implemented")
269
}
270
func (UnimplementedInWorkspaceServiceServer) MountProc(context.Context, *MountProcRequest) (*MountProcResponse, error) {
271
return nil, status.Errorf(codes.Unimplemented, "method MountProc not implemented")
272
}
273
func (UnimplementedInWorkspaceServiceServer) UmountProc(context.Context, *UmountProcRequest) (*UmountProcResponse, error) {
274
return nil, status.Errorf(codes.Unimplemented, "method UmountProc not implemented")
275
}
276
func (UnimplementedInWorkspaceServiceServer) MountSysfs(context.Context, *MountProcRequest) (*MountProcResponse, error) {
277
return nil, status.Errorf(codes.Unimplemented, "method MountSysfs not implemented")
278
}
279
func (UnimplementedInWorkspaceServiceServer) UmountSysfs(context.Context, *UmountProcRequest) (*UmountProcResponse, error) {
280
return nil, status.Errorf(codes.Unimplemented, "method UmountSysfs not implemented")
281
}
282
func (UnimplementedInWorkspaceServiceServer) MountNfs(context.Context, *MountNfsRequest) (*MountNfsResponse, error) {
283
return nil, status.Errorf(codes.Unimplemented, "method MountNfs not implemented")
284
}
285
func (UnimplementedInWorkspaceServiceServer) UmountNfs(context.Context, *UmountNfsRequest) (*UmountNfsResponse, error) {
286
return nil, status.Errorf(codes.Unimplemented, "method UmountNfs not implemented")
287
}
288
func (UnimplementedInWorkspaceServiceServer) Teardown(context.Context, *TeardownRequest) (*TeardownResponse, error) {
289
return nil, status.Errorf(codes.Unimplemented, "method Teardown not implemented")
290
}
291
func (UnimplementedInWorkspaceServiceServer) WipingTeardown(context.Context, *WipingTeardownRequest) (*WipingTeardownResponse, error) {
292
return nil, status.Errorf(codes.Unimplemented, "method WipingTeardown not implemented")
293
}
294
func (UnimplementedInWorkspaceServiceServer) SetupPairVeths(context.Context, *SetupPairVethsRequest) (*SetupPairVethsResponse, error) {
295
return nil, status.Errorf(codes.Unimplemented, "method SetupPairVeths not implemented")
296
}
297
func (UnimplementedInWorkspaceServiceServer) WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error) {
298
return nil, status.Errorf(codes.Unimplemented, "method WorkspaceInfo not implemented")
299
}
300
func (UnimplementedInWorkspaceServiceServer) mustEmbedUnimplementedInWorkspaceServiceServer() {}
301
302
// UnsafeInWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.
303
// Use of this interface is not recommended, as added methods to InWorkspaceServiceServer will
304
// result in compilation errors.
305
type UnsafeInWorkspaceServiceServer interface {
306
mustEmbedUnimplementedInWorkspaceServiceServer()
307
}
308
309
func RegisterInWorkspaceServiceServer(s grpc.ServiceRegistrar, srv InWorkspaceServiceServer) {
310
s.RegisterService(&InWorkspaceService_ServiceDesc, srv)
311
}
312
313
func _InWorkspaceService_PrepareForUserNS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
314
in := new(PrepareForUserNSRequest)
315
if err := dec(in); err != nil {
316
return nil, err
317
}
318
if interceptor == nil {
319
return srv.(InWorkspaceServiceServer).PrepareForUserNS(ctx, in)
320
}
321
info := &grpc.UnaryServerInfo{
322
Server: srv,
323
FullMethod: "/iws.InWorkspaceService/PrepareForUserNS",
324
}
325
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
326
return srv.(InWorkspaceServiceServer).PrepareForUserNS(ctx, req.(*PrepareForUserNSRequest))
327
}
328
return interceptor(ctx, in, info, handler)
329
}
330
331
func _InWorkspaceService_WriteIDMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
332
in := new(WriteIDMappingRequest)
333
if err := dec(in); err != nil {
334
return nil, err
335
}
336
if interceptor == nil {
337
return srv.(InWorkspaceServiceServer).WriteIDMapping(ctx, in)
338
}
339
info := &grpc.UnaryServerInfo{
340
Server: srv,
341
FullMethod: "/iws.InWorkspaceService/WriteIDMapping",
342
}
343
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
344
return srv.(InWorkspaceServiceServer).WriteIDMapping(ctx, req.(*WriteIDMappingRequest))
345
}
346
return interceptor(ctx, in, info, handler)
347
}
348
349
func _InWorkspaceService_EvacuateCGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
350
in := new(EvacuateCGroupRequest)
351
if err := dec(in); err != nil {
352
return nil, err
353
}
354
if interceptor == nil {
355
return srv.(InWorkspaceServiceServer).EvacuateCGroup(ctx, in)
356
}
357
info := &grpc.UnaryServerInfo{
358
Server: srv,
359
FullMethod: "/iws.InWorkspaceService/EvacuateCGroup",
360
}
361
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
362
return srv.(InWorkspaceServiceServer).EvacuateCGroup(ctx, req.(*EvacuateCGroupRequest))
363
}
364
return interceptor(ctx, in, info, handler)
365
}
366
367
func _InWorkspaceService_MountProc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
368
in := new(MountProcRequest)
369
if err := dec(in); err != nil {
370
return nil, err
371
}
372
if interceptor == nil {
373
return srv.(InWorkspaceServiceServer).MountProc(ctx, in)
374
}
375
info := &grpc.UnaryServerInfo{
376
Server: srv,
377
FullMethod: "/iws.InWorkspaceService/MountProc",
378
}
379
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
380
return srv.(InWorkspaceServiceServer).MountProc(ctx, req.(*MountProcRequest))
381
}
382
return interceptor(ctx, in, info, handler)
383
}
384
385
func _InWorkspaceService_UmountProc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
386
in := new(UmountProcRequest)
387
if err := dec(in); err != nil {
388
return nil, err
389
}
390
if interceptor == nil {
391
return srv.(InWorkspaceServiceServer).UmountProc(ctx, in)
392
}
393
info := &grpc.UnaryServerInfo{
394
Server: srv,
395
FullMethod: "/iws.InWorkspaceService/UmountProc",
396
}
397
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
398
return srv.(InWorkspaceServiceServer).UmountProc(ctx, req.(*UmountProcRequest))
399
}
400
return interceptor(ctx, in, info, handler)
401
}
402
403
func _InWorkspaceService_MountSysfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
404
in := new(MountProcRequest)
405
if err := dec(in); err != nil {
406
return nil, err
407
}
408
if interceptor == nil {
409
return srv.(InWorkspaceServiceServer).MountSysfs(ctx, in)
410
}
411
info := &grpc.UnaryServerInfo{
412
Server: srv,
413
FullMethod: "/iws.InWorkspaceService/MountSysfs",
414
}
415
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
416
return srv.(InWorkspaceServiceServer).MountSysfs(ctx, req.(*MountProcRequest))
417
}
418
return interceptor(ctx, in, info, handler)
419
}
420
421
func _InWorkspaceService_UmountSysfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
422
in := new(UmountProcRequest)
423
if err := dec(in); err != nil {
424
return nil, err
425
}
426
if interceptor == nil {
427
return srv.(InWorkspaceServiceServer).UmountSysfs(ctx, in)
428
}
429
info := &grpc.UnaryServerInfo{
430
Server: srv,
431
FullMethod: "/iws.InWorkspaceService/UmountSysfs",
432
}
433
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
434
return srv.(InWorkspaceServiceServer).UmountSysfs(ctx, req.(*UmountProcRequest))
435
}
436
return interceptor(ctx, in, info, handler)
437
}
438
439
func _InWorkspaceService_MountNfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
440
in := new(MountNfsRequest)
441
if err := dec(in); err != nil {
442
return nil, err
443
}
444
if interceptor == nil {
445
return srv.(InWorkspaceServiceServer).MountNfs(ctx, in)
446
}
447
info := &grpc.UnaryServerInfo{
448
Server: srv,
449
FullMethod: "/iws.InWorkspaceService/MountNfs",
450
}
451
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
452
return srv.(InWorkspaceServiceServer).MountNfs(ctx, req.(*MountNfsRequest))
453
}
454
return interceptor(ctx, in, info, handler)
455
}
456
457
func _InWorkspaceService_UmountNfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
458
in := new(UmountNfsRequest)
459
if err := dec(in); err != nil {
460
return nil, err
461
}
462
if interceptor == nil {
463
return srv.(InWorkspaceServiceServer).UmountNfs(ctx, in)
464
}
465
info := &grpc.UnaryServerInfo{
466
Server: srv,
467
FullMethod: "/iws.InWorkspaceService/UmountNfs",
468
}
469
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
470
return srv.(InWorkspaceServiceServer).UmountNfs(ctx, req.(*UmountNfsRequest))
471
}
472
return interceptor(ctx, in, info, handler)
473
}
474
475
func _InWorkspaceService_Teardown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
476
in := new(TeardownRequest)
477
if err := dec(in); err != nil {
478
return nil, err
479
}
480
if interceptor == nil {
481
return srv.(InWorkspaceServiceServer).Teardown(ctx, in)
482
}
483
info := &grpc.UnaryServerInfo{
484
Server: srv,
485
FullMethod: "/iws.InWorkspaceService/Teardown",
486
}
487
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
488
return srv.(InWorkspaceServiceServer).Teardown(ctx, req.(*TeardownRequest))
489
}
490
return interceptor(ctx, in, info, handler)
491
}
492
493
func _InWorkspaceService_WipingTeardown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
494
in := new(WipingTeardownRequest)
495
if err := dec(in); err != nil {
496
return nil, err
497
}
498
if interceptor == nil {
499
return srv.(InWorkspaceServiceServer).WipingTeardown(ctx, in)
500
}
501
info := &grpc.UnaryServerInfo{
502
Server: srv,
503
FullMethod: "/iws.InWorkspaceService/WipingTeardown",
504
}
505
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
506
return srv.(InWorkspaceServiceServer).WipingTeardown(ctx, req.(*WipingTeardownRequest))
507
}
508
return interceptor(ctx, in, info, handler)
509
}
510
511
func _InWorkspaceService_SetupPairVeths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
512
in := new(SetupPairVethsRequest)
513
if err := dec(in); err != nil {
514
return nil, err
515
}
516
if interceptor == nil {
517
return srv.(InWorkspaceServiceServer).SetupPairVeths(ctx, in)
518
}
519
info := &grpc.UnaryServerInfo{
520
Server: srv,
521
FullMethod: "/iws.InWorkspaceService/SetupPairVeths",
522
}
523
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
524
return srv.(InWorkspaceServiceServer).SetupPairVeths(ctx, req.(*SetupPairVethsRequest))
525
}
526
return interceptor(ctx, in, info, handler)
527
}
528
529
func _InWorkspaceService_WorkspaceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
530
in := new(WorkspaceInfoRequest)
531
if err := dec(in); err != nil {
532
return nil, err
533
}
534
if interceptor == nil {
535
return srv.(InWorkspaceServiceServer).WorkspaceInfo(ctx, in)
536
}
537
info := &grpc.UnaryServerInfo{
538
Server: srv,
539
FullMethod: "/iws.InWorkspaceService/WorkspaceInfo",
540
}
541
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
542
return srv.(InWorkspaceServiceServer).WorkspaceInfo(ctx, req.(*WorkspaceInfoRequest))
543
}
544
return interceptor(ctx, in, info, handler)
545
}
546
547
// InWorkspaceService_ServiceDesc is the grpc.ServiceDesc for InWorkspaceService service.
548
// It's only intended for direct use with grpc.RegisterService,
549
// and not to be introspected or modified (even as a copy)
550
var InWorkspaceService_ServiceDesc = grpc.ServiceDesc{
551
ServiceName: "iws.InWorkspaceService",
552
HandlerType: (*InWorkspaceServiceServer)(nil),
553
Methods: []grpc.MethodDesc{
554
{
555
MethodName: "PrepareForUserNS",
556
Handler: _InWorkspaceService_PrepareForUserNS_Handler,
557
},
558
{
559
MethodName: "WriteIDMapping",
560
Handler: _InWorkspaceService_WriteIDMapping_Handler,
561
},
562
{
563
MethodName: "EvacuateCGroup",
564
Handler: _InWorkspaceService_EvacuateCGroup_Handler,
565
},
566
{
567
MethodName: "MountProc",
568
Handler: _InWorkspaceService_MountProc_Handler,
569
},
570
{
571
MethodName: "UmountProc",
572
Handler: _InWorkspaceService_UmountProc_Handler,
573
},
574
{
575
MethodName: "MountSysfs",
576
Handler: _InWorkspaceService_MountSysfs_Handler,
577
},
578
{
579
MethodName: "UmountSysfs",
580
Handler: _InWorkspaceService_UmountSysfs_Handler,
581
},
582
{
583
MethodName: "MountNfs",
584
Handler: _InWorkspaceService_MountNfs_Handler,
585
},
586
{
587
MethodName: "UmountNfs",
588
Handler: _InWorkspaceService_UmountNfs_Handler,
589
},
590
{
591
MethodName: "Teardown",
592
Handler: _InWorkspaceService_Teardown_Handler,
593
},
594
{
595
MethodName: "WipingTeardown",
596
Handler: _InWorkspaceService_WipingTeardown_Handler,
597
},
598
{
599
MethodName: "SetupPairVeths",
600
Handler: _InWorkspaceService_SetupPairVeths_Handler,
601
},
602
{
603
MethodName: "WorkspaceInfo",
604
Handler: _InWorkspaceService_WorkspaceInfo_Handler,
605
},
606
},
607
Streams: []grpc.StreamDesc{},
608
Metadata: "workspace_daemon.proto",
609
}
610
611
// WorkspaceInfoServiceClient is the client API for WorkspaceInfoService service.
612
//
613
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
614
type WorkspaceInfoServiceClient interface {
615
// Get information about the workspace
616
WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error)
617
}
618
619
type workspaceInfoServiceClient struct {
620
cc grpc.ClientConnInterface
621
}
622
623
func NewWorkspaceInfoServiceClient(cc grpc.ClientConnInterface) WorkspaceInfoServiceClient {
624
return &workspaceInfoServiceClient{cc}
625
}
626
627
func (c *workspaceInfoServiceClient) WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error) {
628
out := new(WorkspaceInfoResponse)
629
err := c.cc.Invoke(ctx, "/iws.WorkspaceInfoService/WorkspaceInfo", in, out, opts...)
630
if err != nil {
631
return nil, err
632
}
633
return out, nil
634
}
635
636
// WorkspaceInfoServiceServer is the server API for WorkspaceInfoService service.
637
// All implementations must embed UnimplementedWorkspaceInfoServiceServer
638
// for forward compatibility
639
type WorkspaceInfoServiceServer interface {
640
// Get information about the workspace
641
WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error)
642
mustEmbedUnimplementedWorkspaceInfoServiceServer()
643
}
644
645
// UnimplementedWorkspaceInfoServiceServer must be embedded to have forward compatible implementations.
646
type UnimplementedWorkspaceInfoServiceServer struct {
647
}
648
649
func (UnimplementedWorkspaceInfoServiceServer) WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error) {
650
return nil, status.Errorf(codes.Unimplemented, "method WorkspaceInfo not implemented")
651
}
652
func (UnimplementedWorkspaceInfoServiceServer) mustEmbedUnimplementedWorkspaceInfoServiceServer() {}
653
654
// UnsafeWorkspaceInfoServiceServer may be embedded to opt out of forward compatibility for this service.
655
// Use of this interface is not recommended, as added methods to WorkspaceInfoServiceServer will
656
// result in compilation errors.
657
type UnsafeWorkspaceInfoServiceServer interface {
658
mustEmbedUnimplementedWorkspaceInfoServiceServer()
659
}
660
661
func RegisterWorkspaceInfoServiceServer(s grpc.ServiceRegistrar, srv WorkspaceInfoServiceServer) {
662
s.RegisterService(&WorkspaceInfoService_ServiceDesc, srv)
663
}
664
665
func _WorkspaceInfoService_WorkspaceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
666
in := new(WorkspaceInfoRequest)
667
if err := dec(in); err != nil {
668
return nil, err
669
}
670
if interceptor == nil {
671
return srv.(WorkspaceInfoServiceServer).WorkspaceInfo(ctx, in)
672
}
673
info := &grpc.UnaryServerInfo{
674
Server: srv,
675
FullMethod: "/iws.WorkspaceInfoService/WorkspaceInfo",
676
}
677
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
678
return srv.(WorkspaceInfoServiceServer).WorkspaceInfo(ctx, req.(*WorkspaceInfoRequest))
679
}
680
return interceptor(ctx, in, info, handler)
681
}
682
683
// WorkspaceInfoService_ServiceDesc is the grpc.ServiceDesc for WorkspaceInfoService service.
684
// It's only intended for direct use with grpc.RegisterService,
685
// and not to be introspected or modified (even as a copy)
686
var WorkspaceInfoService_ServiceDesc = grpc.ServiceDesc{
687
ServiceName: "iws.WorkspaceInfoService",
688
HandlerType: (*WorkspaceInfoServiceServer)(nil),
689
Methods: []grpc.MethodDesc{
690
{
691
MethodName: "WorkspaceInfo",
692
Handler: _WorkspaceInfoService_WorkspaceInfo_Handler,
693
},
694
},
695
Streams: []grpc.StreamDesc{},
696
Metadata: "workspace_daemon.proto",
697
}
698
699