command_grpc.pb.go 4.0 KB

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