1
2
3
4
5
6
7 package discoveryv2
8
9 import (
10 context "context"
11 _ "github.com/cncf/xds/go/udpa/annotations"
12 _ "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/annotations"
13 v2 "github.com/emissary-ingress/emissary/v3/pkg/api/envoy/api/v2"
14 _ "github.com/envoyproxy/protoc-gen-validate/validate"
15 _struct "github.com/golang/protobuf/ptypes/struct"
16 _ "google.golang.org/genproto/googleapis/api/annotations"
17 grpc "google.golang.org/grpc"
18 codes "google.golang.org/grpc/codes"
19 status "google.golang.org/grpc/status"
20 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
21 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
22 reflect "reflect"
23 sync "sync"
24 )
25
26 const (
27
28 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
29
30 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
31 )
32
33
34
35 type RtdsDummy struct {
36 state protoimpl.MessageState
37 sizeCache protoimpl.SizeCache
38 unknownFields protoimpl.UnknownFields
39 }
40
41 func (x *RtdsDummy) Reset() {
42 *x = RtdsDummy{}
43 if protoimpl.UnsafeEnabled {
44 mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[0]
45 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
46 ms.StoreMessageInfo(mi)
47 }
48 }
49
50 func (x *RtdsDummy) String() string {
51 return protoimpl.X.MessageStringOf(x)
52 }
53
54 func (*RtdsDummy) ProtoMessage() {}
55
56 func (x *RtdsDummy) ProtoReflect() protoreflect.Message {
57 mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[0]
58 if protoimpl.UnsafeEnabled && x != nil {
59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
60 if ms.LoadMessageInfo() == nil {
61 ms.StoreMessageInfo(mi)
62 }
63 return ms
64 }
65 return mi.MessageOf(x)
66 }
67
68
69 func (*RtdsDummy) Descriptor() ([]byte, []int) {
70 return file_envoy_service_discovery_v2_rtds_proto_rawDescGZIP(), []int{0}
71 }
72
73
74 type Runtime struct {
75 state protoimpl.MessageState
76 sizeCache protoimpl.SizeCache
77 unknownFields protoimpl.UnknownFields
78
79
80
81 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
82 Layer *_struct.Struct `protobuf:"bytes,2,opt,name=layer,proto3" json:"layer,omitempty"`
83 }
84
85 func (x *Runtime) Reset() {
86 *x = Runtime{}
87 if protoimpl.UnsafeEnabled {
88 mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[1]
89 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
90 ms.StoreMessageInfo(mi)
91 }
92 }
93
94 func (x *Runtime) String() string {
95 return protoimpl.X.MessageStringOf(x)
96 }
97
98 func (*Runtime) ProtoMessage() {}
99
100 func (x *Runtime) ProtoReflect() protoreflect.Message {
101 mi := &file_envoy_service_discovery_v2_rtds_proto_msgTypes[1]
102 if protoimpl.UnsafeEnabled && x != nil {
103 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
104 if ms.LoadMessageInfo() == nil {
105 ms.StoreMessageInfo(mi)
106 }
107 return ms
108 }
109 return mi.MessageOf(x)
110 }
111
112
113 func (*Runtime) Descriptor() ([]byte, []int) {
114 return file_envoy_service_discovery_v2_rtds_proto_rawDescGZIP(), []int{1}
115 }
116
117 func (x *Runtime) GetName() string {
118 if x != nil {
119 return x.Name
120 }
121 return ""
122 }
123
124 func (x *Runtime) GetLayer() *_struct.Struct {
125 if x != nil {
126 return x.Layer
127 }
128 return nil
129 }
130
131 var File_envoy_service_discovery_v2_rtds_proto protoreflect.FileDescriptor
132
133 var file_envoy_service_discovery_v2_rtds_proto_rawDesc = []byte{
134 0x0a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
135 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x74, 0x64,
136 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
137 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,
138 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76,
139 0x32, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74,
140 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e,
141 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
142 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
143 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x65,
144 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
145 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
146 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
147 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
148 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
149 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17,
150 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
151 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0b, 0x0a, 0x09, 0x52, 0x74, 0x64, 0x73, 0x44,
152 0x75, 0x6d, 0x6d, 0x79, 0x22, 0x55, 0x0a, 0x07, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12,
153 0x1b, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa,
154 0x42, 0x04, 0x72, 0x02, 0x20, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x05,
155 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f,
156 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74,
157 0x72, 0x75, 0x63, 0x74, 0x52, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x32, 0xf7, 0x02, 0x0a, 0x17,
158 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79,
159 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x56, 0x0a, 0x0d, 0x53, 0x74, 0x72, 0x65, 0x61,
160 0x6d, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
161 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
162 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
163 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72,
164 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12,
165 0x5f, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x12,
166 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x44,
167 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71,
168 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69,
169 0x2e, 0x76, 0x32, 0x2e, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65,
170 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01,
171 0x12, 0x77, 0x0a, 0x0c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
172 0x12, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
173 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
174 0x1a, 0x1f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e,
175 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
176 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x22, 0x15, 0x2f, 0x76, 0x32, 0x2f, 0x64,
177 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x3a, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
178 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x03, 0x3a, 0x01, 0x2a, 0x1a, 0x2a, 0x8a, 0xa4, 0x96, 0xf3, 0x07,
179 0x24, 0x0a, 0x22, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
180 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x75,
181 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x42, 0xb1, 0x01, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76,
182 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
183 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2e,
184 0x76, 0x32, 0x42, 0x09, 0x52, 0x74, 0x64, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
185 0x4d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f,
186 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f,
187 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65,
188 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x2f,
189 0x76, 0x32, 0x3b, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x76, 0x32, 0x88, 0x01,
190 0x01, 0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x1a, 0x12, 0x18, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
191 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
192 0x33, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
193 0x33,
194 }
195
196 var (
197 file_envoy_service_discovery_v2_rtds_proto_rawDescOnce sync.Once
198 file_envoy_service_discovery_v2_rtds_proto_rawDescData = file_envoy_service_discovery_v2_rtds_proto_rawDesc
199 )
200
201 func file_envoy_service_discovery_v2_rtds_proto_rawDescGZIP() []byte {
202 file_envoy_service_discovery_v2_rtds_proto_rawDescOnce.Do(func() {
203 file_envoy_service_discovery_v2_rtds_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_discovery_v2_rtds_proto_rawDescData)
204 })
205 return file_envoy_service_discovery_v2_rtds_proto_rawDescData
206 }
207
208 var file_envoy_service_discovery_v2_rtds_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
209 var file_envoy_service_discovery_v2_rtds_proto_goTypes = []interface{}{
210 (*RtdsDummy)(nil),
211 (*Runtime)(nil),
212 (*_struct.Struct)(nil),
213 (*v2.DiscoveryRequest)(nil),
214 (*v2.DeltaDiscoveryRequest)(nil),
215 (*v2.DiscoveryResponse)(nil),
216 (*v2.DeltaDiscoveryResponse)(nil),
217 }
218 var file_envoy_service_discovery_v2_rtds_proto_depIdxs = []int32{
219 2,
220 3,
221 4,
222 3,
223 5,
224 6,
225 5,
226 4,
227 1,
228 1,
229 1,
230 0,
231 }
232
233 func init() { file_envoy_service_discovery_v2_rtds_proto_init() }
234 func file_envoy_service_discovery_v2_rtds_proto_init() {
235 if File_envoy_service_discovery_v2_rtds_proto != nil {
236 return
237 }
238 if !protoimpl.UnsafeEnabled {
239 file_envoy_service_discovery_v2_rtds_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
240 switch v := v.(*RtdsDummy); i {
241 case 0:
242 return &v.state
243 case 1:
244 return &v.sizeCache
245 case 2:
246 return &v.unknownFields
247 default:
248 return nil
249 }
250 }
251 file_envoy_service_discovery_v2_rtds_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
252 switch v := v.(*Runtime); i {
253 case 0:
254 return &v.state
255 case 1:
256 return &v.sizeCache
257 case 2:
258 return &v.unknownFields
259 default:
260 return nil
261 }
262 }
263 }
264 type x struct{}
265 out := protoimpl.TypeBuilder{
266 File: protoimpl.DescBuilder{
267 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
268 RawDescriptor: file_envoy_service_discovery_v2_rtds_proto_rawDesc,
269 NumEnums: 0,
270 NumMessages: 2,
271 NumExtensions: 0,
272 NumServices: 1,
273 },
274 GoTypes: file_envoy_service_discovery_v2_rtds_proto_goTypes,
275 DependencyIndexes: file_envoy_service_discovery_v2_rtds_proto_depIdxs,
276 MessageInfos: file_envoy_service_discovery_v2_rtds_proto_msgTypes,
277 }.Build()
278 File_envoy_service_discovery_v2_rtds_proto = out.File
279 file_envoy_service_discovery_v2_rtds_proto_rawDesc = nil
280 file_envoy_service_discovery_v2_rtds_proto_goTypes = nil
281 file_envoy_service_discovery_v2_rtds_proto_depIdxs = nil
282 }
283
284
285 var _ context.Context
286 var _ grpc.ClientConnInterface
287
288
289
290 const _ = grpc.SupportPackageIsVersion6
291
292
293
294
295 type RuntimeDiscoveryServiceClient interface {
296 StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error)
297 DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error)
298 FetchRuntime(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error)
299 }
300
301 type runtimeDiscoveryServiceClient struct {
302 cc grpc.ClientConnInterface
303 }
304
305 func NewRuntimeDiscoveryServiceClient(cc grpc.ClientConnInterface) RuntimeDiscoveryServiceClient {
306 return &runtimeDiscoveryServiceClient{cc}
307 }
308
309 func (c *runtimeDiscoveryServiceClient) StreamRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_StreamRuntimeClient, error) {
310 stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[0], "/envoy.service.discovery.v2.RuntimeDiscoveryService/StreamRuntime", opts...)
311 if err != nil {
312 return nil, err
313 }
314 x := &runtimeDiscoveryServiceStreamRuntimeClient{stream}
315 return x, nil
316 }
317
318 type RuntimeDiscoveryService_StreamRuntimeClient interface {
319 Send(*v2.DiscoveryRequest) error
320 Recv() (*v2.DiscoveryResponse, error)
321 grpc.ClientStream
322 }
323
324 type runtimeDiscoveryServiceStreamRuntimeClient struct {
325 grpc.ClientStream
326 }
327
328 func (x *runtimeDiscoveryServiceStreamRuntimeClient) Send(m *v2.DiscoveryRequest) error {
329 return x.ClientStream.SendMsg(m)
330 }
331
332 func (x *runtimeDiscoveryServiceStreamRuntimeClient) Recv() (*v2.DiscoveryResponse, error) {
333 m := new(v2.DiscoveryResponse)
334 if err := x.ClientStream.RecvMsg(m); err != nil {
335 return nil, err
336 }
337 return m, nil
338 }
339
340 func (c *runtimeDiscoveryServiceClient) DeltaRuntime(ctx context.Context, opts ...grpc.CallOption) (RuntimeDiscoveryService_DeltaRuntimeClient, error) {
341 stream, err := c.cc.NewStream(ctx, &_RuntimeDiscoveryService_serviceDesc.Streams[1], "/envoy.service.discovery.v2.RuntimeDiscoveryService/DeltaRuntime", opts...)
342 if err != nil {
343 return nil, err
344 }
345 x := &runtimeDiscoveryServiceDeltaRuntimeClient{stream}
346 return x, nil
347 }
348
349 type RuntimeDiscoveryService_DeltaRuntimeClient interface {
350 Send(*v2.DeltaDiscoveryRequest) error
351 Recv() (*v2.DeltaDiscoveryResponse, error)
352 grpc.ClientStream
353 }
354
355 type runtimeDiscoveryServiceDeltaRuntimeClient struct {
356 grpc.ClientStream
357 }
358
359 func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Send(m *v2.DeltaDiscoveryRequest) error {
360 return x.ClientStream.SendMsg(m)
361 }
362
363 func (x *runtimeDiscoveryServiceDeltaRuntimeClient) Recv() (*v2.DeltaDiscoveryResponse, error) {
364 m := new(v2.DeltaDiscoveryResponse)
365 if err := x.ClientStream.RecvMsg(m); err != nil {
366 return nil, err
367 }
368 return m, nil
369 }
370
371 func (c *runtimeDiscoveryServiceClient) FetchRuntime(ctx context.Context, in *v2.DiscoveryRequest, opts ...grpc.CallOption) (*v2.DiscoveryResponse, error) {
372 out := new(v2.DiscoveryResponse)
373 err := c.cc.Invoke(ctx, "/envoy.service.discovery.v2.RuntimeDiscoveryService/FetchRuntime", in, out, opts...)
374 if err != nil {
375 return nil, err
376 }
377 return out, nil
378 }
379
380
381 type RuntimeDiscoveryServiceServer interface {
382 StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error
383 DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error
384 FetchRuntime(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error)
385 }
386
387
388 type UnimplementedRuntimeDiscoveryServiceServer struct {
389 }
390
391 func (*UnimplementedRuntimeDiscoveryServiceServer) StreamRuntime(RuntimeDiscoveryService_StreamRuntimeServer) error {
392 return status.Errorf(codes.Unimplemented, "method StreamRuntime not implemented")
393 }
394 func (*UnimplementedRuntimeDiscoveryServiceServer) DeltaRuntime(RuntimeDiscoveryService_DeltaRuntimeServer) error {
395 return status.Errorf(codes.Unimplemented, "method DeltaRuntime not implemented")
396 }
397 func (*UnimplementedRuntimeDiscoveryServiceServer) FetchRuntime(context.Context, *v2.DiscoveryRequest) (*v2.DiscoveryResponse, error) {
398 return nil, status.Errorf(codes.Unimplemented, "method FetchRuntime not implemented")
399 }
400
401 func RegisterRuntimeDiscoveryServiceServer(s *grpc.Server, srv RuntimeDiscoveryServiceServer) {
402 s.RegisterService(&_RuntimeDiscoveryService_serviceDesc, srv)
403 }
404
405 func _RuntimeDiscoveryService_StreamRuntime_Handler(srv interface{}, stream grpc.ServerStream) error {
406 return srv.(RuntimeDiscoveryServiceServer).StreamRuntime(&runtimeDiscoveryServiceStreamRuntimeServer{stream})
407 }
408
409 type RuntimeDiscoveryService_StreamRuntimeServer interface {
410 Send(*v2.DiscoveryResponse) error
411 Recv() (*v2.DiscoveryRequest, error)
412 grpc.ServerStream
413 }
414
415 type runtimeDiscoveryServiceStreamRuntimeServer struct {
416 grpc.ServerStream
417 }
418
419 func (x *runtimeDiscoveryServiceStreamRuntimeServer) Send(m *v2.DiscoveryResponse) error {
420 return x.ServerStream.SendMsg(m)
421 }
422
423 func (x *runtimeDiscoveryServiceStreamRuntimeServer) Recv() (*v2.DiscoveryRequest, error) {
424 m := new(v2.DiscoveryRequest)
425 if err := x.ServerStream.RecvMsg(m); err != nil {
426 return nil, err
427 }
428 return m, nil
429 }
430
431 func _RuntimeDiscoveryService_DeltaRuntime_Handler(srv interface{}, stream grpc.ServerStream) error {
432 return srv.(RuntimeDiscoveryServiceServer).DeltaRuntime(&runtimeDiscoveryServiceDeltaRuntimeServer{stream})
433 }
434
435 type RuntimeDiscoveryService_DeltaRuntimeServer interface {
436 Send(*v2.DeltaDiscoveryResponse) error
437 Recv() (*v2.DeltaDiscoveryRequest, error)
438 grpc.ServerStream
439 }
440
441 type runtimeDiscoveryServiceDeltaRuntimeServer struct {
442 grpc.ServerStream
443 }
444
445 func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Send(m *v2.DeltaDiscoveryResponse) error {
446 return x.ServerStream.SendMsg(m)
447 }
448
449 func (x *runtimeDiscoveryServiceDeltaRuntimeServer) Recv() (*v2.DeltaDiscoveryRequest, error) {
450 m := new(v2.DeltaDiscoveryRequest)
451 if err := x.ServerStream.RecvMsg(m); err != nil {
452 return nil, err
453 }
454 return m, nil
455 }
456
457 func _RuntimeDiscoveryService_FetchRuntime_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
458 in := new(v2.DiscoveryRequest)
459 if err := dec(in); err != nil {
460 return nil, err
461 }
462 if interceptor == nil {
463 return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, in)
464 }
465 info := &grpc.UnaryServerInfo{
466 Server: srv,
467 FullMethod: "/envoy.service.discovery.v2.RuntimeDiscoveryService/FetchRuntime",
468 }
469 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
470 return srv.(RuntimeDiscoveryServiceServer).FetchRuntime(ctx, req.(*v2.DiscoveryRequest))
471 }
472 return interceptor(ctx, in, info, handler)
473 }
474
475 var _RuntimeDiscoveryService_serviceDesc = grpc.ServiceDesc{
476 ServiceName: "envoy.service.discovery.v2.RuntimeDiscoveryService",
477 HandlerType: (*RuntimeDiscoveryServiceServer)(nil),
478 Methods: []grpc.MethodDesc{
479 {
480 MethodName: "FetchRuntime",
481 Handler: _RuntimeDiscoveryService_FetchRuntime_Handler,
482 },
483 },
484 Streams: []grpc.StreamDesc{
485 {
486 StreamName: "StreamRuntime",
487 Handler: _RuntimeDiscoveryService_StreamRuntime_Handler,
488 ServerStreams: true,
489 ClientStreams: true,
490 },
491 {
492 StreamName: "DeltaRuntime",
493 Handler: _RuntimeDiscoveryService_DeltaRuntime_Handler,
494 ServerStreams: true,
495 ClientStreams: true,
496 },
497 },
498 Metadata: "envoy/service/discovery/v2/rtds.proto",
499 }
500
View as plain text