github.com/xraypb/xray-core@v1.6.6/app/observatory/command/command_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.18.0 5 // source: app/observatory/command/command.proto 6 7 package command 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 // ObservatoryServiceClient is the client API for ObservatoryService 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 ObservatoryServiceClient interface { 25 GetOutboundStatus(ctx context.Context, in *GetOutboundStatusRequest, opts ...grpc.CallOption) (*GetOutboundStatusResponse, error) 26 } 27 28 type observatoryServiceClient struct { 29 cc grpc.ClientConnInterface 30 } 31 32 func NewObservatoryServiceClient(cc grpc.ClientConnInterface) ObservatoryServiceClient { 33 return &observatoryServiceClient{cc} 34 } 35 36 func (c *observatoryServiceClient) GetOutboundStatus(ctx context.Context, in *GetOutboundStatusRequest, opts ...grpc.CallOption) (*GetOutboundStatusResponse, error) { 37 out := new(GetOutboundStatusResponse) 38 err := c.cc.Invoke(ctx, "/xray.core.app.observatory.command.ObservatoryService/GetOutboundStatus", in, out, opts...) 39 if err != nil { 40 return nil, err 41 } 42 return out, nil 43 } 44 45 // ObservatoryServiceServer is the server API for ObservatoryService service. 46 // All implementations must embed UnimplementedObservatoryServiceServer 47 // for forward compatibility 48 type ObservatoryServiceServer interface { 49 GetOutboundStatus(context.Context, *GetOutboundStatusRequest) (*GetOutboundStatusResponse, error) 50 mustEmbedUnimplementedObservatoryServiceServer() 51 } 52 53 // UnimplementedObservatoryServiceServer must be embedded to have forward compatible implementations. 54 type UnimplementedObservatoryServiceServer struct { 55 } 56 57 func (UnimplementedObservatoryServiceServer) GetOutboundStatus(context.Context, *GetOutboundStatusRequest) (*GetOutboundStatusResponse, error) { 58 return nil, status.Errorf(codes.Unimplemented, "method GetOutboundStatus not implemented") 59 } 60 func (UnimplementedObservatoryServiceServer) mustEmbedUnimplementedObservatoryServiceServer() {} 61 62 // UnsafeObservatoryServiceServer may be embedded to opt out of forward compatibility for this service. 63 // Use of this interface is not recommended, as added methods to ObservatoryServiceServer will 64 // result in compilation errors. 65 type UnsafeObservatoryServiceServer interface { 66 mustEmbedUnimplementedObservatoryServiceServer() 67 } 68 69 func RegisterObservatoryServiceServer(s grpc.ServiceRegistrar, srv ObservatoryServiceServer) { 70 s.RegisterService(&ObservatoryService_ServiceDesc, srv) 71 } 72 73 func _ObservatoryService_GetOutboundStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 74 in := new(GetOutboundStatusRequest) 75 if err := dec(in); err != nil { 76 return nil, err 77 } 78 if interceptor == nil { 79 return srv.(ObservatoryServiceServer).GetOutboundStatus(ctx, in) 80 } 81 info := &grpc.UnaryServerInfo{ 82 Server: srv, 83 FullMethod: "/xray.core.app.observatory.command.ObservatoryService/GetOutboundStatus", 84 } 85 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 86 return srv.(ObservatoryServiceServer).GetOutboundStatus(ctx, req.(*GetOutboundStatusRequest)) 87 } 88 return interceptor(ctx, in, info, handler) 89 } 90 91 // ObservatoryService_ServiceDesc is the grpc.ServiceDesc for ObservatoryService 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 ObservatoryService_ServiceDesc = grpc.ServiceDesc{ 95 ServiceName: "xray.core.app.observatory.command.ObservatoryService", 96 HandlerType: (*ObservatoryServiceServer)(nil), 97 Methods: []grpc.MethodDesc{ 98 { 99 MethodName: "GetOutboundStatus", 100 Handler: _ObservatoryService_GetOutboundStatus_Handler, 101 }, 102 }, 103 Streams: []grpc.StreamDesc{}, 104 Metadata: "app/observatory/command/command.proto", 105 }