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