github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/reflection/grpc_reflection_v1alpha/reflection_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.14.0 5 // source: reflection/grpc_reflection_v1alpha/reflection.proto 6 7 package grpc_reflection_v1alpha 8 9 import ( 10 context "context" 11 grpc "github.com/hxx258456/ccgo/grpc" 12 codes "github.com/hxx258456/ccgo/grpc/codes" 13 status "github.com/hxx258456/ccgo/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 // ServerReflectionClient is the client API for ServerReflection 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 ServerReflectionClient interface { 25 // The reflection service is structured as a bidirectional stream, ensuring 26 // all related requests go to a single server. 27 ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (ServerReflection_ServerReflectionInfoClient, error) 28 } 29 30 type serverReflectionClient struct { 31 cc grpc.ClientConnInterface 32 } 33 34 func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClient { 35 return &serverReflectionClient{cc} 36 } 37 38 func (c *serverReflectionClient) ServerReflectionInfo(ctx context.Context, opts ...grpc.CallOption) (ServerReflection_ServerReflectionInfoClient, error) { 39 stream, err := c.cc.NewStream(ctx, &ServerReflection_ServiceDesc.Streams[0], "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo", opts...) 40 if err != nil { 41 return nil, err 42 } 43 x := &serverReflectionServerReflectionInfoClient{stream} 44 return x, nil 45 } 46 47 type ServerReflection_ServerReflectionInfoClient interface { 48 Send(*ServerReflectionRequest) error 49 Recv() (*ServerReflectionResponse, error) 50 grpc.ClientStream 51 } 52 53 type serverReflectionServerReflectionInfoClient struct { 54 grpc.ClientStream 55 } 56 57 func (x *serverReflectionServerReflectionInfoClient) Send(m *ServerReflectionRequest) error { 58 return x.ClientStream.SendMsg(m) 59 } 60 61 func (x *serverReflectionServerReflectionInfoClient) Recv() (*ServerReflectionResponse, error) { 62 m := new(ServerReflectionResponse) 63 if err := x.ClientStream.RecvMsg(m); err != nil { 64 return nil, err 65 } 66 return m, nil 67 } 68 69 // ServerReflectionServer is the server API for ServerReflection service. 70 // All implementations should embed UnimplementedServerReflectionServer 71 // for forward compatibility 72 type ServerReflectionServer interface { 73 // The reflection service is structured as a bidirectional stream, ensuring 74 // all related requests go to a single server. 75 ServerReflectionInfo(ServerReflection_ServerReflectionInfoServer) error 76 } 77 78 // UnimplementedServerReflectionServer should be embedded to have forward compatible implementations. 79 type UnimplementedServerReflectionServer struct { 80 } 81 82 func (UnimplementedServerReflectionServer) ServerReflectionInfo(ServerReflection_ServerReflectionInfoServer) error { 83 return status.Errorf(codes.Unimplemented, "method ServerReflectionInfo not implemented") 84 } 85 86 // UnsafeServerReflectionServer may be embedded to opt out of forward compatibility for this service. 87 // Use of this interface is not recommended, as added methods to ServerReflectionServer will 88 // result in compilation errors. 89 type UnsafeServerReflectionServer interface { 90 mustEmbedUnimplementedServerReflectionServer() 91 } 92 93 func RegisterServerReflectionServer(s grpc.ServiceRegistrar, srv ServerReflectionServer) { 94 s.RegisterService(&ServerReflection_ServiceDesc, srv) 95 } 96 97 func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error { 98 return srv.(ServerReflectionServer).ServerReflectionInfo(&serverReflectionServerReflectionInfoServer{stream}) 99 } 100 101 type ServerReflection_ServerReflectionInfoServer interface { 102 Send(*ServerReflectionResponse) error 103 Recv() (*ServerReflectionRequest, error) 104 grpc.ServerStream 105 } 106 107 type serverReflectionServerReflectionInfoServer struct { 108 grpc.ServerStream 109 } 110 111 func (x *serverReflectionServerReflectionInfoServer) Send(m *ServerReflectionResponse) error { 112 return x.ServerStream.SendMsg(m) 113 } 114 115 func (x *serverReflectionServerReflectionInfoServer) Recv() (*ServerReflectionRequest, error) { 116 m := new(ServerReflectionRequest) 117 if err := x.ServerStream.RecvMsg(m); err != nil { 118 return nil, err 119 } 120 return m, nil 121 } 122 123 // ServerReflection_ServiceDesc is the grpc.ServiceDesc for ServerReflection service. 124 // It's only intended for direct use with grpc.RegisterService, 125 // and not to be introspected or modified (even as a copy) 126 var ServerReflection_ServiceDesc = grpc.ServiceDesc{ 127 ServiceName: "grpc.reflection.v1alpha.ServerReflection", 128 HandlerType: (*ServerReflectionServer)(nil), 129 Methods: []grpc.MethodDesc{}, 130 Streams: []grpc.StreamDesc{ 131 { 132 StreamName: "ServerReflectionInfo", 133 Handler: _ServerReflection_ServerReflectionInfo_Handler, 134 ServerStreams: true, 135 ClientStreams: true, 136 }, 137 }, 138 Metadata: "reflection/grpc_reflection_v1alpha/reflection.proto", 139 }