Path: blob/main/components/ws-daemon-api/go/workspace_daemon_grpc.pb.go
2496 views
// Copyright (c) 2024 Gitpod GmbH. All rights reserved.1// Licensed under the GNU Affero General Public License (AGPL).2// See License.AGPL.txt in the project root for license information.34// Code generated by protoc-gen-go-grpc. DO NOT EDIT.5// versions:6// - protoc-gen-go-grpc v1.2.07// - protoc v3.20.18// source: workspace_daemon.proto910package api1112import (13context "context"14grpc "google.golang.org/grpc"15codes "google.golang.org/grpc/codes"16status "google.golang.org/grpc/status"17)1819// This is a compile-time assertion to ensure that this generated file20// is compatible with the grpc package it is being compiled against.21// Requires gRPC-Go v1.32.0 or later.22const _ = grpc.SupportPackageIsVersion72324// InWorkspaceServiceClient is the client API for InWorkspaceService service.25//26// 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.27type InWorkspaceServiceClient interface {28// PrepareForUserNS prepares a workspace container for wrapping it in a user namespace.29// A container that called this function MUST call Teardown.30//31// This call will make the workspace container's rootfs shared, and mount the workspace32// container's rootfs as a shiftfs mark under `/.workspace/mark` if the workspace has33// the daemon hostPath mount. Can only be used once per workspace.34PrepareForUserNS(ctx context.Context, in *PrepareForUserNSRequest, opts ...grpc.CallOption) (*PrepareForUserNSResponse, error)35// WriteIDMapping writes a new user/group ID mapping to /proc/<pid>/uid_map (gid_map respectively). This is used36// for user namespaces and is available four times every 10 seconds.37WriteIDMapping(ctx context.Context, in *WriteIDMappingRequest, opts ...grpc.CallOption) (*WriteIDMappingResponse, error)38// EvacuateCGroup empties the workspace pod cgroup and produces a new substructure.39// In combincation with introducing a new cgroup namespace, we can create a situation40// where the subcontroller are enabled and the ring2-visible cgroup is of type "domain".41EvacuateCGroup(ctx context.Context, in *EvacuateCGroupRequest, opts ...grpc.CallOption) (*EvacuateCGroupResponse, error)42// MountProc mounts a masked proc in the container's rootfs.43// The PID must be in the PID namespace of the workspace container.44// The path is relative to the mount namespace of the PID.45MountProc(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error)46// UmountProc unmounts a masked proc from the container's rootfs.47// The PID must be in the PID namespace of the workspace container.48// The path is relative to the mount namespace of the PID.49UmountProc(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error)50// MountSysfs mounts a masked sysfs in the container's rootfs.51// The PID must be in the PID namespace of the workspace container.52// The path is relative to the mount namespace of the PID.53MountSysfs(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error)54// UmountSysfs unmounts a masked sysfs from the container's rootfs.55// The PID must be in the PID namespace of the workspace container.56// The path is relative to the mount namespace of the PID.57UmountSysfs(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error)58// MountNfs mounts a nfs share into the container's rootfs.59// The PID must be in the PID namespace of the workspace container.60// The path is relative to the mount namespace of the PID.61MountNfs(ctx context.Context, in *MountNfsRequest, opts ...grpc.CallOption) (*MountNfsResponse, error)62// UmountNfs unmounts a nfs share from the container's rootfs.63// The PID must be in the PID namespace of the workspace container.64// The path is relative to the mount namespace of the PID.65UmountNfs(ctx context.Context, in *UmountNfsRequest, opts ...grpc.CallOption) (*UmountNfsResponse, error)66// Teardown prepares workspace content backups and unmounts shiftfs mounts. The canary is supposed to be triggered67// when the workspace is about to shut down, e.g. using the PreStop hook of a Kubernetes container.68Teardown(ctx context.Context, in *TeardownRequest, opts ...grpc.CallOption) (*TeardownResponse, error)69// WipingTeardown undoes everything PrepareForUserNS does, especially unmounts shiftfs mounts70WipingTeardown(ctx context.Context, in *WipingTeardownRequest, opts ...grpc.CallOption) (*WipingTeardownResponse, error)71// Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace.72SetupPairVeths(ctx context.Context, in *SetupPairVethsRequest, opts ...grpc.CallOption) (*SetupPairVethsResponse, error)73// Get information about the workspace74WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error)75}7677type inWorkspaceServiceClient struct {78cc grpc.ClientConnInterface79}8081func NewInWorkspaceServiceClient(cc grpc.ClientConnInterface) InWorkspaceServiceClient {82return &inWorkspaceServiceClient{cc}83}8485func (c *inWorkspaceServiceClient) PrepareForUserNS(ctx context.Context, in *PrepareForUserNSRequest, opts ...grpc.CallOption) (*PrepareForUserNSResponse, error) {86out := new(PrepareForUserNSResponse)87err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/PrepareForUserNS", in, out, opts...)88if err != nil {89return nil, err90}91return out, nil92}9394func (c *inWorkspaceServiceClient) WriteIDMapping(ctx context.Context, in *WriteIDMappingRequest, opts ...grpc.CallOption) (*WriteIDMappingResponse, error) {95out := new(WriteIDMappingResponse)96err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/WriteIDMapping", in, out, opts...)97if err != nil {98return nil, err99}100return out, nil101}102103func (c *inWorkspaceServiceClient) EvacuateCGroup(ctx context.Context, in *EvacuateCGroupRequest, opts ...grpc.CallOption) (*EvacuateCGroupResponse, error) {104out := new(EvacuateCGroupResponse)105err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/EvacuateCGroup", in, out, opts...)106if err != nil {107return nil, err108}109return out, nil110}111112func (c *inWorkspaceServiceClient) MountProc(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error) {113out := new(MountProcResponse)114err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/MountProc", in, out, opts...)115if err != nil {116return nil, err117}118return out, nil119}120121func (c *inWorkspaceServiceClient) UmountProc(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error) {122out := new(UmountProcResponse)123err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/UmountProc", in, out, opts...)124if err != nil {125return nil, err126}127return out, nil128}129130func (c *inWorkspaceServiceClient) MountSysfs(ctx context.Context, in *MountProcRequest, opts ...grpc.CallOption) (*MountProcResponse, error) {131out := new(MountProcResponse)132err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/MountSysfs", in, out, opts...)133if err != nil {134return nil, err135}136return out, nil137}138139func (c *inWorkspaceServiceClient) UmountSysfs(ctx context.Context, in *UmountProcRequest, opts ...grpc.CallOption) (*UmountProcResponse, error) {140out := new(UmountProcResponse)141err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/UmountSysfs", in, out, opts...)142if err != nil {143return nil, err144}145return out, nil146}147148func (c *inWorkspaceServiceClient) MountNfs(ctx context.Context, in *MountNfsRequest, opts ...grpc.CallOption) (*MountNfsResponse, error) {149out := new(MountNfsResponse)150err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/MountNfs", in, out, opts...)151if err != nil {152return nil, err153}154return out, nil155}156157func (c *inWorkspaceServiceClient) UmountNfs(ctx context.Context, in *UmountNfsRequest, opts ...grpc.CallOption) (*UmountNfsResponse, error) {158out := new(UmountNfsResponse)159err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/UmountNfs", in, out, opts...)160if err != nil {161return nil, err162}163return out, nil164}165166func (c *inWorkspaceServiceClient) Teardown(ctx context.Context, in *TeardownRequest, opts ...grpc.CallOption) (*TeardownResponse, error) {167out := new(TeardownResponse)168err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/Teardown", in, out, opts...)169if err != nil {170return nil, err171}172return out, nil173}174175func (c *inWorkspaceServiceClient) WipingTeardown(ctx context.Context, in *WipingTeardownRequest, opts ...grpc.CallOption) (*WipingTeardownResponse, error) {176out := new(WipingTeardownResponse)177err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/WipingTeardown", in, out, opts...)178if err != nil {179return nil, err180}181return out, nil182}183184func (c *inWorkspaceServiceClient) SetupPairVeths(ctx context.Context, in *SetupPairVethsRequest, opts ...grpc.CallOption) (*SetupPairVethsResponse, error) {185out := new(SetupPairVethsResponse)186err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/SetupPairVeths", in, out, opts...)187if err != nil {188return nil, err189}190return out, nil191}192193func (c *inWorkspaceServiceClient) WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error) {194out := new(WorkspaceInfoResponse)195err := c.cc.Invoke(ctx, "/iws.InWorkspaceService/WorkspaceInfo", in, out, opts...)196if err != nil {197return nil, err198}199return out, nil200}201202// InWorkspaceServiceServer is the server API for InWorkspaceService service.203// All implementations must embed UnimplementedInWorkspaceServiceServer204// for forward compatibility205type InWorkspaceServiceServer interface {206// PrepareForUserNS prepares a workspace container for wrapping it in a user namespace.207// A container that called this function MUST call Teardown.208//209// This call will make the workspace container's rootfs shared, and mount the workspace210// container's rootfs as a shiftfs mark under `/.workspace/mark` if the workspace has211// the daemon hostPath mount. Can only be used once per workspace.212PrepareForUserNS(context.Context, *PrepareForUserNSRequest) (*PrepareForUserNSResponse, error)213// WriteIDMapping writes a new user/group ID mapping to /proc/<pid>/uid_map (gid_map respectively). This is used214// for user namespaces and is available four times every 10 seconds.215WriteIDMapping(context.Context, *WriteIDMappingRequest) (*WriteIDMappingResponse, error)216// EvacuateCGroup empties the workspace pod cgroup and produces a new substructure.217// In combincation with introducing a new cgroup namespace, we can create a situation218// where the subcontroller are enabled and the ring2-visible cgroup is of type "domain".219EvacuateCGroup(context.Context, *EvacuateCGroupRequest) (*EvacuateCGroupResponse, error)220// MountProc mounts a masked proc in the container's rootfs.221// The PID must be in the PID namespace of the workspace container.222// The path is relative to the mount namespace of the PID.223MountProc(context.Context, *MountProcRequest) (*MountProcResponse, error)224// UmountProc unmounts a masked proc from the container's rootfs.225// The PID must be in the PID namespace of the workspace container.226// The path is relative to the mount namespace of the PID.227UmountProc(context.Context, *UmountProcRequest) (*UmountProcResponse, error)228// MountSysfs mounts a masked sysfs in the container's rootfs.229// The PID must be in the PID namespace of the workspace container.230// The path is relative to the mount namespace of the PID.231MountSysfs(context.Context, *MountProcRequest) (*MountProcResponse, error)232// UmountSysfs unmounts a masked sysfs from the container's rootfs.233// The PID must be in the PID namespace of the workspace container.234// The path is relative to the mount namespace of the PID.235UmountSysfs(context.Context, *UmountProcRequest) (*UmountProcResponse, error)236// MountNfs mounts a nfs share into the container's rootfs.237// The PID must be in the PID namespace of the workspace container.238// The path is relative to the mount namespace of the PID.239MountNfs(context.Context, *MountNfsRequest) (*MountNfsResponse, error)240// UmountNfs unmounts a nfs share from the container's rootfs.241// The PID must be in the PID namespace of the workspace container.242// The path is relative to the mount namespace of the PID.243UmountNfs(context.Context, *UmountNfsRequest) (*UmountNfsResponse, error)244// Teardown prepares workspace content backups and unmounts shiftfs mounts. The canary is supposed to be triggered245// when the workspace is about to shut down, e.g. using the PreStop hook of a Kubernetes container.246Teardown(context.Context, *TeardownRequest) (*TeardownResponse, error)247// WipingTeardown undoes everything PrepareForUserNS does, especially unmounts shiftfs mounts248WipingTeardown(context.Context, *WipingTeardownRequest) (*WipingTeardownResponse, error)249// Set up a pair of veths that interconnect the specified PID and the workspace container's network namespace.250SetupPairVeths(context.Context, *SetupPairVethsRequest) (*SetupPairVethsResponse, error)251// Get information about the workspace252WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error)253mustEmbedUnimplementedInWorkspaceServiceServer()254}255256// UnimplementedInWorkspaceServiceServer must be embedded to have forward compatible implementations.257type UnimplementedInWorkspaceServiceServer struct {258}259260func (UnimplementedInWorkspaceServiceServer) PrepareForUserNS(context.Context, *PrepareForUserNSRequest) (*PrepareForUserNSResponse, error) {261return nil, status.Errorf(codes.Unimplemented, "method PrepareForUserNS not implemented")262}263func (UnimplementedInWorkspaceServiceServer) WriteIDMapping(context.Context, *WriteIDMappingRequest) (*WriteIDMappingResponse, error) {264return nil, status.Errorf(codes.Unimplemented, "method WriteIDMapping not implemented")265}266func (UnimplementedInWorkspaceServiceServer) EvacuateCGroup(context.Context, *EvacuateCGroupRequest) (*EvacuateCGroupResponse, error) {267return nil, status.Errorf(codes.Unimplemented, "method EvacuateCGroup not implemented")268}269func (UnimplementedInWorkspaceServiceServer) MountProc(context.Context, *MountProcRequest) (*MountProcResponse, error) {270return nil, status.Errorf(codes.Unimplemented, "method MountProc not implemented")271}272func (UnimplementedInWorkspaceServiceServer) UmountProc(context.Context, *UmountProcRequest) (*UmountProcResponse, error) {273return nil, status.Errorf(codes.Unimplemented, "method UmountProc not implemented")274}275func (UnimplementedInWorkspaceServiceServer) MountSysfs(context.Context, *MountProcRequest) (*MountProcResponse, error) {276return nil, status.Errorf(codes.Unimplemented, "method MountSysfs not implemented")277}278func (UnimplementedInWorkspaceServiceServer) UmountSysfs(context.Context, *UmountProcRequest) (*UmountProcResponse, error) {279return nil, status.Errorf(codes.Unimplemented, "method UmountSysfs not implemented")280}281func (UnimplementedInWorkspaceServiceServer) MountNfs(context.Context, *MountNfsRequest) (*MountNfsResponse, error) {282return nil, status.Errorf(codes.Unimplemented, "method MountNfs not implemented")283}284func (UnimplementedInWorkspaceServiceServer) UmountNfs(context.Context, *UmountNfsRequest) (*UmountNfsResponse, error) {285return nil, status.Errorf(codes.Unimplemented, "method UmountNfs not implemented")286}287func (UnimplementedInWorkspaceServiceServer) Teardown(context.Context, *TeardownRequest) (*TeardownResponse, error) {288return nil, status.Errorf(codes.Unimplemented, "method Teardown not implemented")289}290func (UnimplementedInWorkspaceServiceServer) WipingTeardown(context.Context, *WipingTeardownRequest) (*WipingTeardownResponse, error) {291return nil, status.Errorf(codes.Unimplemented, "method WipingTeardown not implemented")292}293func (UnimplementedInWorkspaceServiceServer) SetupPairVeths(context.Context, *SetupPairVethsRequest) (*SetupPairVethsResponse, error) {294return nil, status.Errorf(codes.Unimplemented, "method SetupPairVeths not implemented")295}296func (UnimplementedInWorkspaceServiceServer) WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error) {297return nil, status.Errorf(codes.Unimplemented, "method WorkspaceInfo not implemented")298}299func (UnimplementedInWorkspaceServiceServer) mustEmbedUnimplementedInWorkspaceServiceServer() {}300301// UnsafeInWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.302// Use of this interface is not recommended, as added methods to InWorkspaceServiceServer will303// result in compilation errors.304type UnsafeInWorkspaceServiceServer interface {305mustEmbedUnimplementedInWorkspaceServiceServer()306}307308func RegisterInWorkspaceServiceServer(s grpc.ServiceRegistrar, srv InWorkspaceServiceServer) {309s.RegisterService(&InWorkspaceService_ServiceDesc, srv)310}311312func _InWorkspaceService_PrepareForUserNS_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {313in := new(PrepareForUserNSRequest)314if err := dec(in); err != nil {315return nil, err316}317if interceptor == nil {318return srv.(InWorkspaceServiceServer).PrepareForUserNS(ctx, in)319}320info := &grpc.UnaryServerInfo{321Server: srv,322FullMethod: "/iws.InWorkspaceService/PrepareForUserNS",323}324handler := func(ctx context.Context, req interface{}) (interface{}, error) {325return srv.(InWorkspaceServiceServer).PrepareForUserNS(ctx, req.(*PrepareForUserNSRequest))326}327return interceptor(ctx, in, info, handler)328}329330func _InWorkspaceService_WriteIDMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {331in := new(WriteIDMappingRequest)332if err := dec(in); err != nil {333return nil, err334}335if interceptor == nil {336return srv.(InWorkspaceServiceServer).WriteIDMapping(ctx, in)337}338info := &grpc.UnaryServerInfo{339Server: srv,340FullMethod: "/iws.InWorkspaceService/WriteIDMapping",341}342handler := func(ctx context.Context, req interface{}) (interface{}, error) {343return srv.(InWorkspaceServiceServer).WriteIDMapping(ctx, req.(*WriteIDMappingRequest))344}345return interceptor(ctx, in, info, handler)346}347348func _InWorkspaceService_EvacuateCGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {349in := new(EvacuateCGroupRequest)350if err := dec(in); err != nil {351return nil, err352}353if interceptor == nil {354return srv.(InWorkspaceServiceServer).EvacuateCGroup(ctx, in)355}356info := &grpc.UnaryServerInfo{357Server: srv,358FullMethod: "/iws.InWorkspaceService/EvacuateCGroup",359}360handler := func(ctx context.Context, req interface{}) (interface{}, error) {361return srv.(InWorkspaceServiceServer).EvacuateCGroup(ctx, req.(*EvacuateCGroupRequest))362}363return interceptor(ctx, in, info, handler)364}365366func _InWorkspaceService_MountProc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {367in := new(MountProcRequest)368if err := dec(in); err != nil {369return nil, err370}371if interceptor == nil {372return srv.(InWorkspaceServiceServer).MountProc(ctx, in)373}374info := &grpc.UnaryServerInfo{375Server: srv,376FullMethod: "/iws.InWorkspaceService/MountProc",377}378handler := func(ctx context.Context, req interface{}) (interface{}, error) {379return srv.(InWorkspaceServiceServer).MountProc(ctx, req.(*MountProcRequest))380}381return interceptor(ctx, in, info, handler)382}383384func _InWorkspaceService_UmountProc_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {385in := new(UmountProcRequest)386if err := dec(in); err != nil {387return nil, err388}389if interceptor == nil {390return srv.(InWorkspaceServiceServer).UmountProc(ctx, in)391}392info := &grpc.UnaryServerInfo{393Server: srv,394FullMethod: "/iws.InWorkspaceService/UmountProc",395}396handler := func(ctx context.Context, req interface{}) (interface{}, error) {397return srv.(InWorkspaceServiceServer).UmountProc(ctx, req.(*UmountProcRequest))398}399return interceptor(ctx, in, info, handler)400}401402func _InWorkspaceService_MountSysfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {403in := new(MountProcRequest)404if err := dec(in); err != nil {405return nil, err406}407if interceptor == nil {408return srv.(InWorkspaceServiceServer).MountSysfs(ctx, in)409}410info := &grpc.UnaryServerInfo{411Server: srv,412FullMethod: "/iws.InWorkspaceService/MountSysfs",413}414handler := func(ctx context.Context, req interface{}) (interface{}, error) {415return srv.(InWorkspaceServiceServer).MountSysfs(ctx, req.(*MountProcRequest))416}417return interceptor(ctx, in, info, handler)418}419420func _InWorkspaceService_UmountSysfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {421in := new(UmountProcRequest)422if err := dec(in); err != nil {423return nil, err424}425if interceptor == nil {426return srv.(InWorkspaceServiceServer).UmountSysfs(ctx, in)427}428info := &grpc.UnaryServerInfo{429Server: srv,430FullMethod: "/iws.InWorkspaceService/UmountSysfs",431}432handler := func(ctx context.Context, req interface{}) (interface{}, error) {433return srv.(InWorkspaceServiceServer).UmountSysfs(ctx, req.(*UmountProcRequest))434}435return interceptor(ctx, in, info, handler)436}437438func _InWorkspaceService_MountNfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {439in := new(MountNfsRequest)440if err := dec(in); err != nil {441return nil, err442}443if interceptor == nil {444return srv.(InWorkspaceServiceServer).MountNfs(ctx, in)445}446info := &grpc.UnaryServerInfo{447Server: srv,448FullMethod: "/iws.InWorkspaceService/MountNfs",449}450handler := func(ctx context.Context, req interface{}) (interface{}, error) {451return srv.(InWorkspaceServiceServer).MountNfs(ctx, req.(*MountNfsRequest))452}453return interceptor(ctx, in, info, handler)454}455456func _InWorkspaceService_UmountNfs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {457in := new(UmountNfsRequest)458if err := dec(in); err != nil {459return nil, err460}461if interceptor == nil {462return srv.(InWorkspaceServiceServer).UmountNfs(ctx, in)463}464info := &grpc.UnaryServerInfo{465Server: srv,466FullMethod: "/iws.InWorkspaceService/UmountNfs",467}468handler := func(ctx context.Context, req interface{}) (interface{}, error) {469return srv.(InWorkspaceServiceServer).UmountNfs(ctx, req.(*UmountNfsRequest))470}471return interceptor(ctx, in, info, handler)472}473474func _InWorkspaceService_Teardown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {475in := new(TeardownRequest)476if err := dec(in); err != nil {477return nil, err478}479if interceptor == nil {480return srv.(InWorkspaceServiceServer).Teardown(ctx, in)481}482info := &grpc.UnaryServerInfo{483Server: srv,484FullMethod: "/iws.InWorkspaceService/Teardown",485}486handler := func(ctx context.Context, req interface{}) (interface{}, error) {487return srv.(InWorkspaceServiceServer).Teardown(ctx, req.(*TeardownRequest))488}489return interceptor(ctx, in, info, handler)490}491492func _InWorkspaceService_WipingTeardown_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {493in := new(WipingTeardownRequest)494if err := dec(in); err != nil {495return nil, err496}497if interceptor == nil {498return srv.(InWorkspaceServiceServer).WipingTeardown(ctx, in)499}500info := &grpc.UnaryServerInfo{501Server: srv,502FullMethod: "/iws.InWorkspaceService/WipingTeardown",503}504handler := func(ctx context.Context, req interface{}) (interface{}, error) {505return srv.(InWorkspaceServiceServer).WipingTeardown(ctx, req.(*WipingTeardownRequest))506}507return interceptor(ctx, in, info, handler)508}509510func _InWorkspaceService_SetupPairVeths_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {511in := new(SetupPairVethsRequest)512if err := dec(in); err != nil {513return nil, err514}515if interceptor == nil {516return srv.(InWorkspaceServiceServer).SetupPairVeths(ctx, in)517}518info := &grpc.UnaryServerInfo{519Server: srv,520FullMethod: "/iws.InWorkspaceService/SetupPairVeths",521}522handler := func(ctx context.Context, req interface{}) (interface{}, error) {523return srv.(InWorkspaceServiceServer).SetupPairVeths(ctx, req.(*SetupPairVethsRequest))524}525return interceptor(ctx, in, info, handler)526}527528func _InWorkspaceService_WorkspaceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {529in := new(WorkspaceInfoRequest)530if err := dec(in); err != nil {531return nil, err532}533if interceptor == nil {534return srv.(InWorkspaceServiceServer).WorkspaceInfo(ctx, in)535}536info := &grpc.UnaryServerInfo{537Server: srv,538FullMethod: "/iws.InWorkspaceService/WorkspaceInfo",539}540handler := func(ctx context.Context, req interface{}) (interface{}, error) {541return srv.(InWorkspaceServiceServer).WorkspaceInfo(ctx, req.(*WorkspaceInfoRequest))542}543return interceptor(ctx, in, info, handler)544}545546// InWorkspaceService_ServiceDesc is the grpc.ServiceDesc for InWorkspaceService service.547// It's only intended for direct use with grpc.RegisterService,548// and not to be introspected or modified (even as a copy)549var InWorkspaceService_ServiceDesc = grpc.ServiceDesc{550ServiceName: "iws.InWorkspaceService",551HandlerType: (*InWorkspaceServiceServer)(nil),552Methods: []grpc.MethodDesc{553{554MethodName: "PrepareForUserNS",555Handler: _InWorkspaceService_PrepareForUserNS_Handler,556},557{558MethodName: "WriteIDMapping",559Handler: _InWorkspaceService_WriteIDMapping_Handler,560},561{562MethodName: "EvacuateCGroup",563Handler: _InWorkspaceService_EvacuateCGroup_Handler,564},565{566MethodName: "MountProc",567Handler: _InWorkspaceService_MountProc_Handler,568},569{570MethodName: "UmountProc",571Handler: _InWorkspaceService_UmountProc_Handler,572},573{574MethodName: "MountSysfs",575Handler: _InWorkspaceService_MountSysfs_Handler,576},577{578MethodName: "UmountSysfs",579Handler: _InWorkspaceService_UmountSysfs_Handler,580},581{582MethodName: "MountNfs",583Handler: _InWorkspaceService_MountNfs_Handler,584},585{586MethodName: "UmountNfs",587Handler: _InWorkspaceService_UmountNfs_Handler,588},589{590MethodName: "Teardown",591Handler: _InWorkspaceService_Teardown_Handler,592},593{594MethodName: "WipingTeardown",595Handler: _InWorkspaceService_WipingTeardown_Handler,596},597{598MethodName: "SetupPairVeths",599Handler: _InWorkspaceService_SetupPairVeths_Handler,600},601{602MethodName: "WorkspaceInfo",603Handler: _InWorkspaceService_WorkspaceInfo_Handler,604},605},606Streams: []grpc.StreamDesc{},607Metadata: "workspace_daemon.proto",608}609610// WorkspaceInfoServiceClient is the client API for WorkspaceInfoService service.611//612// 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.613type WorkspaceInfoServiceClient interface {614// Get information about the workspace615WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error)616}617618type workspaceInfoServiceClient struct {619cc grpc.ClientConnInterface620}621622func NewWorkspaceInfoServiceClient(cc grpc.ClientConnInterface) WorkspaceInfoServiceClient {623return &workspaceInfoServiceClient{cc}624}625626func (c *workspaceInfoServiceClient) WorkspaceInfo(ctx context.Context, in *WorkspaceInfoRequest, opts ...grpc.CallOption) (*WorkspaceInfoResponse, error) {627out := new(WorkspaceInfoResponse)628err := c.cc.Invoke(ctx, "/iws.WorkspaceInfoService/WorkspaceInfo", in, out, opts...)629if err != nil {630return nil, err631}632return out, nil633}634635// WorkspaceInfoServiceServer is the server API for WorkspaceInfoService service.636// All implementations must embed UnimplementedWorkspaceInfoServiceServer637// for forward compatibility638type WorkspaceInfoServiceServer interface {639// Get information about the workspace640WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error)641mustEmbedUnimplementedWorkspaceInfoServiceServer()642}643644// UnimplementedWorkspaceInfoServiceServer must be embedded to have forward compatible implementations.645type UnimplementedWorkspaceInfoServiceServer struct {646}647648func (UnimplementedWorkspaceInfoServiceServer) WorkspaceInfo(context.Context, *WorkspaceInfoRequest) (*WorkspaceInfoResponse, error) {649return nil, status.Errorf(codes.Unimplemented, "method WorkspaceInfo not implemented")650}651func (UnimplementedWorkspaceInfoServiceServer) mustEmbedUnimplementedWorkspaceInfoServiceServer() {}652653// UnsafeWorkspaceInfoServiceServer may be embedded to opt out of forward compatibility for this service.654// Use of this interface is not recommended, as added methods to WorkspaceInfoServiceServer will655// result in compilation errors.656type UnsafeWorkspaceInfoServiceServer interface {657mustEmbedUnimplementedWorkspaceInfoServiceServer()658}659660func RegisterWorkspaceInfoServiceServer(s grpc.ServiceRegistrar, srv WorkspaceInfoServiceServer) {661s.RegisterService(&WorkspaceInfoService_ServiceDesc, srv)662}663664func _WorkspaceInfoService_WorkspaceInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {665in := new(WorkspaceInfoRequest)666if err := dec(in); err != nil {667return nil, err668}669if interceptor == nil {670return srv.(WorkspaceInfoServiceServer).WorkspaceInfo(ctx, in)671}672info := &grpc.UnaryServerInfo{673Server: srv,674FullMethod: "/iws.WorkspaceInfoService/WorkspaceInfo",675}676handler := func(ctx context.Context, req interface{}) (interface{}, error) {677return srv.(WorkspaceInfoServiceServer).WorkspaceInfo(ctx, req.(*WorkspaceInfoRequest))678}679return interceptor(ctx, in, info, handler)680}681682// WorkspaceInfoService_ServiceDesc is the grpc.ServiceDesc for WorkspaceInfoService service.683// It's only intended for direct use with grpc.RegisterService,684// and not to be introspected or modified (even as a copy)685var WorkspaceInfoService_ServiceDesc = grpc.ServiceDesc{686ServiceName: "iws.WorkspaceInfoService",687HandlerType: (*WorkspaceInfoServiceServer)(nil),688Methods: []grpc.MethodDesc{689{690MethodName: "WorkspaceInfo",691Handler: _WorkspaceInfoService_WorkspaceInfo_Handler,692},693},694Streams: []grpc.StreamDesc{},695Metadata: "workspace_daemon.proto",696}697698699