github.com/ungtb10d/cli/v2@v2.0.0-20221110210412-98537dd9d6a1/internal/codespaces/grpc/jupyter/JupyterServerHostService.v1_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.2.0 4 // - protoc v3.12.4 5 // source: jupyter/JupyterServerHostService.v1.proto 6 7 package jupyter 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the grpc package it is being compiled against. 18 // Requires gRPC-Go v1.32.0 or later. 19 const _ = grpc.SupportPackageIsVersion7 20 21 // JupyterServerHostClient is the client API for JupyterServerHost service. 22 // 23 // 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. 24 type JupyterServerHostClient interface { 25 GetRunningServer(ctx context.Context, in *GetRunningServerRequest, opts ...grpc.CallOption) (*GetRunningServerResponse, error) 26 } 27 28 type jupyterServerHostClient struct { 29 cc grpc.ClientConnInterface 30 } 31 32 func NewJupyterServerHostClient(cc grpc.ClientConnInterface) JupyterServerHostClient { 33 return &jupyterServerHostClient{cc} 34 } 35 36 func (c *jupyterServerHostClient) GetRunningServer(ctx context.Context, in *GetRunningServerRequest, opts ...grpc.CallOption) (*GetRunningServerResponse, error) { 37 out := new(GetRunningServerResponse) 38 err := c.cc.Invoke(ctx, "/Codespaces.Grpc.JupyterServerHostService.v1.JupyterServerHost/GetRunningServer", in, out, opts...) 39 if err != nil { 40 return nil, err 41 } 42 return out, nil 43 } 44 45 // JupyterServerHostServer is the server API for JupyterServerHost service. 46 // All implementations must embed UnimplementedJupyterServerHostServer 47 // for forward compatibility 48 type JupyterServerHostServer interface { 49 GetRunningServer(context.Context, *GetRunningServerRequest) (*GetRunningServerResponse, error) 50 mustEmbedUnimplementedJupyterServerHostServer() 51 } 52 53 // UnimplementedJupyterServerHostServer must be embedded to have forward compatible implementations. 54 type UnimplementedJupyterServerHostServer struct { 55 } 56 57 func (UnimplementedJupyterServerHostServer) GetRunningServer(context.Context, *GetRunningServerRequest) (*GetRunningServerResponse, error) { 58 return nil, status.Errorf(codes.Unimplemented, "method GetRunningServer not implemented") 59 } 60 func (UnimplementedJupyterServerHostServer) mustEmbedUnimplementedJupyterServerHostServer() {} 61 62 // UnsafeJupyterServerHostServer may be embedded to opt out of forward compatibility for this service. 63 // Use of this interface is not recommended, as added methods to JupyterServerHostServer will 64 // result in compilation errors. 65 type UnsafeJupyterServerHostServer interface { 66 mustEmbedUnimplementedJupyterServerHostServer() 67 } 68 69 func RegisterJupyterServerHostServer(s grpc.ServiceRegistrar, srv JupyterServerHostServer) { 70 s.RegisterService(&JupyterServerHost_ServiceDesc, srv) 71 } 72 73 func _JupyterServerHost_GetRunningServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 74 in := new(GetRunningServerRequest) 75 if err := dec(in); err != nil { 76 return nil, err 77 } 78 if interceptor == nil { 79 return srv.(JupyterServerHostServer).GetRunningServer(ctx, in) 80 } 81 info := &grpc.UnaryServerInfo{ 82 Server: srv, 83 FullMethod: "/Codespaces.Grpc.JupyterServerHostService.v1.JupyterServerHost/GetRunningServer", 84 } 85 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 86 return srv.(JupyterServerHostServer).GetRunningServer(ctx, req.(*GetRunningServerRequest)) 87 } 88 return interceptor(ctx, in, info, handler) 89 } 90 91 // JupyterServerHost_ServiceDesc is the grpc.ServiceDesc for JupyterServerHost service. 92 // It's only intended for direct use with grpc.RegisterService, 93 // and not to be introspected or modified (even as a copy) 94 var JupyterServerHost_ServiceDesc = grpc.ServiceDesc{ 95 ServiceName: "Codespaces.Grpc.JupyterServerHostService.v1.JupyterServerHost", 96 HandlerType: (*JupyterServerHostServer)(nil), 97 Methods: []grpc.MethodDesc{ 98 { 99 MethodName: "GetRunningServer", 100 Handler: _JupyterServerHost_GetRunningServer_Handler, 101 }, 102 }, 103 Streams: []grpc.StreamDesc{}, 104 Metadata: "jupyter/JupyterServerHostService.v1.proto", 105 }