github.com/v2fly/v2ray-core/v5@v5.16.2-0.20240507031116-8191faa6e095/app/observatory/command/command_grpc.pb.go (about) 1 package command 2 3 import ( 4 context "context" 5 grpc "google.golang.org/grpc" 6 codes "google.golang.org/grpc/codes" 7 status "google.golang.org/grpc/status" 8 ) 9 10 // This is a compile-time assertion to ensure that this generated file 11 // is compatible with the grpc package it is being compiled against. 12 // Requires gRPC-Go v1.32.0 or later. 13 const _ = grpc.SupportPackageIsVersion7 14 15 const ( 16 ObservatoryService_GetOutboundStatus_FullMethodName = "/v2ray.core.app.observatory.command.ObservatoryService/GetOutboundStatus" 17 ) 18 19 // ObservatoryServiceClient is the client API for ObservatoryService service. 20 // 21 // 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. 22 type ObservatoryServiceClient interface { 23 GetOutboundStatus(ctx context.Context, in *GetOutboundStatusRequest, opts ...grpc.CallOption) (*GetOutboundStatusResponse, error) 24 } 25 26 type observatoryServiceClient struct { 27 cc grpc.ClientConnInterface 28 } 29 30 func NewObservatoryServiceClient(cc grpc.ClientConnInterface) ObservatoryServiceClient { 31 return &observatoryServiceClient{cc} 32 } 33 34 func (c *observatoryServiceClient) GetOutboundStatus(ctx context.Context, in *GetOutboundStatusRequest, opts ...grpc.CallOption) (*GetOutboundStatusResponse, error) { 35 out := new(GetOutboundStatusResponse) 36 err := c.cc.Invoke(ctx, ObservatoryService_GetOutboundStatus_FullMethodName, in, out, opts...) 37 if err != nil { 38 return nil, err 39 } 40 return out, nil 41 } 42 43 // ObservatoryServiceServer is the server API for ObservatoryService service. 44 // All implementations must embed UnimplementedObservatoryServiceServer 45 // for forward compatibility 46 type ObservatoryServiceServer interface { 47 GetOutboundStatus(context.Context, *GetOutboundStatusRequest) (*GetOutboundStatusResponse, error) 48 mustEmbedUnimplementedObservatoryServiceServer() 49 } 50 51 // UnimplementedObservatoryServiceServer must be embedded to have forward compatible implementations. 52 type UnimplementedObservatoryServiceServer struct { 53 } 54 55 func (UnimplementedObservatoryServiceServer) GetOutboundStatus(context.Context, *GetOutboundStatusRequest) (*GetOutboundStatusResponse, error) { 56 return nil, status.Errorf(codes.Unimplemented, "method GetOutboundStatus not implemented") 57 } 58 func (UnimplementedObservatoryServiceServer) mustEmbedUnimplementedObservatoryServiceServer() {} 59 60 // UnsafeObservatoryServiceServer may be embedded to opt out of forward compatibility for this service. 61 // Use of this interface is not recommended, as added methods to ObservatoryServiceServer will 62 // result in compilation errors. 63 type UnsafeObservatoryServiceServer interface { 64 mustEmbedUnimplementedObservatoryServiceServer() 65 } 66 67 func RegisterObservatoryServiceServer(s grpc.ServiceRegistrar, srv ObservatoryServiceServer) { 68 s.RegisterService(&ObservatoryService_ServiceDesc, srv) 69 } 70 71 func _ObservatoryService_GetOutboundStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 72 in := new(GetOutboundStatusRequest) 73 if err := dec(in); err != nil { 74 return nil, err 75 } 76 if interceptor == nil { 77 return srv.(ObservatoryServiceServer).GetOutboundStatus(ctx, in) 78 } 79 info := &grpc.UnaryServerInfo{ 80 Server: srv, 81 FullMethod: ObservatoryService_GetOutboundStatus_FullMethodName, 82 } 83 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 84 return srv.(ObservatoryServiceServer).GetOutboundStatus(ctx, req.(*GetOutboundStatusRequest)) 85 } 86 return interceptor(ctx, in, info, handler) 87 } 88 89 // ObservatoryService_ServiceDesc is the grpc.ServiceDesc for ObservatoryService service. 90 // It's only intended for direct use with grpc.RegisterService, 91 // and not to be introspected or modified (even as a copy) 92 var ObservatoryService_ServiceDesc = grpc.ServiceDesc{ 93 ServiceName: "v2ray.core.app.observatory.command.ObservatoryService", 94 HandlerType: (*ObservatoryServiceServer)(nil), 95 Methods: []grpc.MethodDesc{ 96 { 97 MethodName: "GetOutboundStatus", 98 Handler: _ObservatoryService_GetOutboundStatus_Handler, 99 }, 100 }, 101 Streams: []grpc.StreamDesc{}, 102 Metadata: "app/observatory/command/command.proto", 103 }