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