command_grpc.pb.go 4.1 KB

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