1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package watcher
22
23 import (
24 context "context"
25 reflect "reflect"
26 sync "sync"
27
28 _ "google.golang.org/genproto/googleapis/api/annotations"
29 grpc "google.golang.org/grpc"
30 codes "google.golang.org/grpc/codes"
31 status "google.golang.org/grpc/status"
32 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
33 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
34 anypb "google.golang.org/protobuf/types/known/anypb"
35 _ "google.golang.org/protobuf/types/known/emptypb"
36 )
37
38 const (
39
40 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
41
42 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
43 )
44
45
46 type Change_State int32
47
48 const (
49
50 Change_EXISTS Change_State = 0
51
52 Change_DOES_NOT_EXIST Change_State = 1
53
54
55
56 Change_INITIAL_STATE_SKIPPED Change_State = 2
57
58
59
60 Change_ERROR Change_State = 3
61 )
62
63
64 var (
65 Change_State_name = map[int32]string{
66 0: "EXISTS",
67 1: "DOES_NOT_EXIST",
68 2: "INITIAL_STATE_SKIPPED",
69 3: "ERROR",
70 }
71 Change_State_value = map[string]int32{
72 "EXISTS": 0,
73 "DOES_NOT_EXIST": 1,
74 "INITIAL_STATE_SKIPPED": 2,
75 "ERROR": 3,
76 }
77 )
78
79 func (x Change_State) Enum() *Change_State {
80 p := new(Change_State)
81 *p = x
82 return p
83 }
84
85 func (x Change_State) String() string {
86 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
87 }
88
89 func (Change_State) Descriptor() protoreflect.EnumDescriptor {
90 return file_google_watcher_v1_watch_proto_enumTypes[0].Descriptor()
91 }
92
93 func (Change_State) Type() protoreflect.EnumType {
94 return &file_google_watcher_v1_watch_proto_enumTypes[0]
95 }
96
97 func (x Change_State) Number() protoreflect.EnumNumber {
98 return protoreflect.EnumNumber(x)
99 }
100
101
102 func (Change_State) EnumDescriptor() ([]byte, []int) {
103 return file_google_watcher_v1_watch_proto_rawDescGZIP(), []int{2, 0}
104 }
105
106
107 type Request struct {
108 state protoimpl.MessageState
109 sizeCache protoimpl.SizeCache
110 unknownFields protoimpl.UnknownFields
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136 Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166 ResumeMarker []byte `protobuf:"bytes,2,opt,name=resume_marker,json=resumeMarker,proto3" json:"resume_marker,omitempty"`
167 }
168
169 func (x *Request) Reset() {
170 *x = Request{}
171 if protoimpl.UnsafeEnabled {
172 mi := &file_google_watcher_v1_watch_proto_msgTypes[0]
173 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
174 ms.StoreMessageInfo(mi)
175 }
176 }
177
178 func (x *Request) String() string {
179 return protoimpl.X.MessageStringOf(x)
180 }
181
182 func (*Request) ProtoMessage() {}
183
184 func (x *Request) ProtoReflect() protoreflect.Message {
185 mi := &file_google_watcher_v1_watch_proto_msgTypes[0]
186 if protoimpl.UnsafeEnabled && x != nil {
187 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
188 if ms.LoadMessageInfo() == nil {
189 ms.StoreMessageInfo(mi)
190 }
191 return ms
192 }
193 return mi.MessageOf(x)
194 }
195
196
197 func (*Request) Descriptor() ([]byte, []int) {
198 return file_google_watcher_v1_watch_proto_rawDescGZIP(), []int{0}
199 }
200
201 func (x *Request) GetTarget() string {
202 if x != nil {
203 return x.Target
204 }
205 return ""
206 }
207
208 func (x *Request) GetResumeMarker() []byte {
209 if x != nil {
210 return x.ResumeMarker
211 }
212 return nil
213 }
214
215
216 type ChangeBatch struct {
217 state protoimpl.MessageState
218 sizeCache protoimpl.SizeCache
219 unknownFields protoimpl.UnknownFields
220
221
222 Changes []*Change `protobuf:"bytes,1,rep,name=changes,proto3" json:"changes,omitempty"`
223 }
224
225 func (x *ChangeBatch) Reset() {
226 *x = ChangeBatch{}
227 if protoimpl.UnsafeEnabled {
228 mi := &file_google_watcher_v1_watch_proto_msgTypes[1]
229 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
230 ms.StoreMessageInfo(mi)
231 }
232 }
233
234 func (x *ChangeBatch) String() string {
235 return protoimpl.X.MessageStringOf(x)
236 }
237
238 func (*ChangeBatch) ProtoMessage() {}
239
240 func (x *ChangeBatch) ProtoReflect() protoreflect.Message {
241 mi := &file_google_watcher_v1_watch_proto_msgTypes[1]
242 if protoimpl.UnsafeEnabled && x != nil {
243 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
244 if ms.LoadMessageInfo() == nil {
245 ms.StoreMessageInfo(mi)
246 }
247 return ms
248 }
249 return mi.MessageOf(x)
250 }
251
252
253 func (*ChangeBatch) Descriptor() ([]byte, []int) {
254 return file_google_watcher_v1_watch_proto_rawDescGZIP(), []int{1}
255 }
256
257 func (x *ChangeBatch) GetChanges() []*Change {
258 if x != nil {
259 return x.Changes
260 }
261 return nil
262 }
263
264
265 type Change struct {
266 state protoimpl.MessageState
267 sizeCache protoimpl.SizeCache
268 unknownFields protoimpl.UnknownFields
269
270
271
272
273 Element string `protobuf:"bytes,1,opt,name=element,proto3" json:"element,omitempty"`
274
275 State Change_State `protobuf:"varint,2,opt,name=state,proto3,enum=google.watcher.v1.Change_State" json:"state,omitempty"`
276
277
278
279 Data *anypb.Any `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
280
281
282
283
284
285 ResumeMarker []byte `protobuf:"bytes,4,opt,name=resume_marker,json=resumeMarker,proto3" json:"resume_marker,omitempty"`
286
287
288 Continued bool `protobuf:"varint,5,opt,name=continued,proto3" json:"continued,omitempty"`
289 }
290
291 func (x *Change) Reset() {
292 *x = Change{}
293 if protoimpl.UnsafeEnabled {
294 mi := &file_google_watcher_v1_watch_proto_msgTypes[2]
295 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
296 ms.StoreMessageInfo(mi)
297 }
298 }
299
300 func (x *Change) String() string {
301 return protoimpl.X.MessageStringOf(x)
302 }
303
304 func (*Change) ProtoMessage() {}
305
306 func (x *Change) ProtoReflect() protoreflect.Message {
307 mi := &file_google_watcher_v1_watch_proto_msgTypes[2]
308 if protoimpl.UnsafeEnabled && x != nil {
309 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
310 if ms.LoadMessageInfo() == nil {
311 ms.StoreMessageInfo(mi)
312 }
313 return ms
314 }
315 return mi.MessageOf(x)
316 }
317
318
319 func (*Change) Descriptor() ([]byte, []int) {
320 return file_google_watcher_v1_watch_proto_rawDescGZIP(), []int{2}
321 }
322
323 func (x *Change) GetElement() string {
324 if x != nil {
325 return x.Element
326 }
327 return ""
328 }
329
330 func (x *Change) GetState() Change_State {
331 if x != nil {
332 return x.State
333 }
334 return Change_EXISTS
335 }
336
337 func (x *Change) GetData() *anypb.Any {
338 if x != nil {
339 return x.Data
340 }
341 return nil
342 }
343
344 func (x *Change) GetResumeMarker() []byte {
345 if x != nil {
346 return x.ResumeMarker
347 }
348 return nil
349 }
350
351 func (x *Change) GetContinued() bool {
352 if x != nil {
353 return x.Continued
354 }
355 return false
356 }
357
358 var File_google_watcher_v1_watch_proto protoreflect.FileDescriptor
359
360 var file_google_watcher_v1_watch_proto_rawDesc = []byte{
361 0x0a, 0x1d, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72,
362 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
363 0x11, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e,
364 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
365 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
366 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
367 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f,
368 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70,
369 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x46, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75,
370 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x01, 0x20,
371 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72,
372 0x65, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
373 0x28, 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72,
374 0x22, 0x42, 0x0a, 0x0b, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12,
375 0x33, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
376 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65,
377 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x07, 0x63, 0x68, 0x61,
378 0x6e, 0x67, 0x65, 0x73, 0x22, 0x95, 0x02, 0x0a, 0x06, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12,
379 0x18, 0x0a, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
380 0x52, 0x07, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x05, 0x73, 0x74, 0x61,
381 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
382 0x65, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61,
383 0x6e, 0x67, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65,
384 0x12, 0x28, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14,
385 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
386 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
387 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28,
388 0x0c, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x75, 0x6d, 0x65, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12,
389 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01,
390 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x64, 0x22, 0x4d, 0x0a,
391 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x58, 0x49, 0x53, 0x54, 0x53,
392 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x45, 0x53, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45,
393 0x58, 0x49, 0x53, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41,
394 0x4c, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10,
395 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x32, 0x63, 0x0a, 0x07,
396 0x57, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x12, 0x58, 0x0a, 0x05, 0x57, 0x61, 0x74, 0x63, 0x68,
397 0x12, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65,
398 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67,
399 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x31,
400 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x22, 0x11, 0x82, 0xd3,
401 0xe4, 0x93, 0x02, 0x0b, 0x12, 0x09, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x74, 0x63, 0x68, 0x30,
402 0x01, 0x42, 0x5f, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
403 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x57, 0x61, 0x74, 0x63,
404 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
405 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70,
406 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f,
407 0x77, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x77, 0x61, 0x74, 0x63, 0x68,
408 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
409 }
410
411 var (
412 file_google_watcher_v1_watch_proto_rawDescOnce sync.Once
413 file_google_watcher_v1_watch_proto_rawDescData = file_google_watcher_v1_watch_proto_rawDesc
414 )
415
416 func file_google_watcher_v1_watch_proto_rawDescGZIP() []byte {
417 file_google_watcher_v1_watch_proto_rawDescOnce.Do(func() {
418 file_google_watcher_v1_watch_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_watcher_v1_watch_proto_rawDescData)
419 })
420 return file_google_watcher_v1_watch_proto_rawDescData
421 }
422
423 var file_google_watcher_v1_watch_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
424 var file_google_watcher_v1_watch_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
425 var file_google_watcher_v1_watch_proto_goTypes = []interface{}{
426 (Change_State)(0),
427 (*Request)(nil),
428 (*ChangeBatch)(nil),
429 (*Change)(nil),
430 (*anypb.Any)(nil),
431 }
432 var file_google_watcher_v1_watch_proto_depIdxs = []int32{
433 3,
434 0,
435 4,
436 1,
437 2,
438 4,
439 3,
440 3,
441 3,
442 0,
443 }
444
445 func init() { file_google_watcher_v1_watch_proto_init() }
446 func file_google_watcher_v1_watch_proto_init() {
447 if File_google_watcher_v1_watch_proto != nil {
448 return
449 }
450 if !protoimpl.UnsafeEnabled {
451 file_google_watcher_v1_watch_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
452 switch v := v.(*Request); i {
453 case 0:
454 return &v.state
455 case 1:
456 return &v.sizeCache
457 case 2:
458 return &v.unknownFields
459 default:
460 return nil
461 }
462 }
463 file_google_watcher_v1_watch_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
464 switch v := v.(*ChangeBatch); i {
465 case 0:
466 return &v.state
467 case 1:
468 return &v.sizeCache
469 case 2:
470 return &v.unknownFields
471 default:
472 return nil
473 }
474 }
475 file_google_watcher_v1_watch_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
476 switch v := v.(*Change); i {
477 case 0:
478 return &v.state
479 case 1:
480 return &v.sizeCache
481 case 2:
482 return &v.unknownFields
483 default:
484 return nil
485 }
486 }
487 }
488 type x struct{}
489 out := protoimpl.TypeBuilder{
490 File: protoimpl.DescBuilder{
491 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
492 RawDescriptor: file_google_watcher_v1_watch_proto_rawDesc,
493 NumEnums: 1,
494 NumMessages: 3,
495 NumExtensions: 0,
496 NumServices: 1,
497 },
498 GoTypes: file_google_watcher_v1_watch_proto_goTypes,
499 DependencyIndexes: file_google_watcher_v1_watch_proto_depIdxs,
500 EnumInfos: file_google_watcher_v1_watch_proto_enumTypes,
501 MessageInfos: file_google_watcher_v1_watch_proto_msgTypes,
502 }.Build()
503 File_google_watcher_v1_watch_proto = out.File
504 file_google_watcher_v1_watch_proto_rawDesc = nil
505 file_google_watcher_v1_watch_proto_goTypes = nil
506 file_google_watcher_v1_watch_proto_depIdxs = nil
507 }
508
509
510 var _ context.Context
511 var _ grpc.ClientConnInterface
512
513
514
515 const _ = grpc.SupportPackageIsVersion6
516
517
518
519
520 type WatcherClient interface {
521
522 Watch(ctx context.Context, in *Request, opts ...grpc.CallOption) (Watcher_WatchClient, error)
523 }
524
525 type watcherClient struct {
526 cc grpc.ClientConnInterface
527 }
528
529 func NewWatcherClient(cc grpc.ClientConnInterface) WatcherClient {
530 return &watcherClient{cc}
531 }
532
533 func (c *watcherClient) Watch(ctx context.Context, in *Request, opts ...grpc.CallOption) (Watcher_WatchClient, error) {
534 stream, err := c.cc.NewStream(ctx, &_Watcher_serviceDesc.Streams[0], "/google.watcher.v1.Watcher/Watch", opts...)
535 if err != nil {
536 return nil, err
537 }
538 x := &watcherWatchClient{stream}
539 if err := x.ClientStream.SendMsg(in); err != nil {
540 return nil, err
541 }
542 if err := x.ClientStream.CloseSend(); err != nil {
543 return nil, err
544 }
545 return x, nil
546 }
547
548 type Watcher_WatchClient interface {
549 Recv() (*ChangeBatch, error)
550 grpc.ClientStream
551 }
552
553 type watcherWatchClient struct {
554 grpc.ClientStream
555 }
556
557 func (x *watcherWatchClient) Recv() (*ChangeBatch, error) {
558 m := new(ChangeBatch)
559 if err := x.ClientStream.RecvMsg(m); err != nil {
560 return nil, err
561 }
562 return m, nil
563 }
564
565
566 type WatcherServer interface {
567
568 Watch(*Request, Watcher_WatchServer) error
569 }
570
571
572 type UnimplementedWatcherServer struct {
573 }
574
575 func (*UnimplementedWatcherServer) Watch(*Request, Watcher_WatchServer) error {
576 return status.Errorf(codes.Unimplemented, "method Watch not implemented")
577 }
578
579 func RegisterWatcherServer(s *grpc.Server, srv WatcherServer) {
580 s.RegisterService(&_Watcher_serviceDesc, srv)
581 }
582
583 func _Watcher_Watch_Handler(srv interface{}, stream grpc.ServerStream) error {
584 m := new(Request)
585 if err := stream.RecvMsg(m); err != nil {
586 return err
587 }
588 return srv.(WatcherServer).Watch(m, &watcherWatchServer{stream})
589 }
590
591 type Watcher_WatchServer interface {
592 Send(*ChangeBatch) error
593 grpc.ServerStream
594 }
595
596 type watcherWatchServer struct {
597 grpc.ServerStream
598 }
599
600 func (x *watcherWatchServer) Send(m *ChangeBatch) error {
601 return x.ServerStream.SendMsg(m)
602 }
603
604 var _Watcher_serviceDesc = grpc.ServiceDesc{
605 ServiceName: "google.watcher.v1.Watcher",
606 HandlerType: (*WatcherServer)(nil),
607 Methods: []grpc.MethodDesc{},
608 Streams: []grpc.StreamDesc{
609 {
610 StreamName: "Watch",
611 Handler: _Watcher_Watch_Handler,
612 ServerStreams: true,
613 },
614 },
615 Metadata: "google/watcher/v1/watch.proto",
616 }
617
View as plain text