1// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2// versions:
3// - protoc-gen-go-grpc v1.1.0
4// - protoc             v3.14.0
5// source: reflection/grpc_reflection_v1alpha/reflection.proto
6
7package grpc_reflection_v1alpha
8
9import (
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.
19const _ = 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.
24type 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
30type serverReflectionClient struct {
31	cc grpc.ClientConnInterface
32}
33
34func NewServerReflectionClient(cc grpc.ClientConnInterface) ServerReflectionClient {
35	return &serverReflectionClient{cc}
36}
37
38func (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
47type ServerReflection_ServerReflectionInfoClient interface {
48	Send(*ServerReflectionRequest) error
49	Recv() (*ServerReflectionResponse, error)
50	grpc.ClientStream
51}
52
53type serverReflectionServerReflectionInfoClient struct {
54	grpc.ClientStream
55}
56
57func (x *serverReflectionServerReflectionInfoClient) Send(m *ServerReflectionRequest) error {
58	return x.ClientStream.SendMsg(m)
59}
60
61func (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
72type 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.
79type UnimplementedServerReflectionServer struct {
80}
81
82func (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.
89type UnsafeServerReflectionServer interface {
90	mustEmbedUnimplementedServerReflectionServer()
91}
92
93func RegisterServerReflectionServer(s grpc.ServiceRegistrar, srv ServerReflectionServer) {
94	s.RegisterService(&ServerReflection_ServiceDesc, srv)
95}
96
97func _ServerReflection_ServerReflectionInfo_Handler(srv interface{}, stream grpc.ServerStream) error {
98	return srv.(ServerReflectionServer).ServerReflectionInfo(&serverReflectionServerReflectionInfoServer{stream})
99}
100
101type ServerReflection_ServerReflectionInfoServer interface {
102	Send(*ServerReflectionResponse) error
103	Recv() (*ServerReflectionRequest, error)
104	grpc.ServerStream
105}
106
107type serverReflectionServerReflectionInfoServer struct {
108	grpc.ServerStream
109}
110
111func (x *serverReflectionServerReflectionInfoServer) Send(m *ServerReflectionResponse) error {
112	return x.ServerStream.SendMsg(m)
113}
114
115func (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)
126var 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}
140