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