command_grpc.pb.go 4.0 KB

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