| 1 |
// Copyright 2025 Google LLC |
| 2 |
// |
| 3 |
// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
// you may not use this file except in compliance with the License. |
| 5 |
// You may obtain a copy of the License at |
| 6 |
// |
| 7 |
// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
// |
| 9 |
// Unless required by applicable law or agreed to in writing, software |
| 10 |
// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
// See the License for the specific language governing permissions and |
| 13 |
// limitations under the License. |
| 14 |
|
| 15 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// protoc-gen-go v1.26.0 |
| 18 |
// protoc v4.24.4 |
| 19 |
// source: google/watcher/v1/watch.proto |
| 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 |
// Verify that this generated code is sufficiently up-to-date. |
| 40 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 41 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 42 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 43 |
) |
| 44 |
|
| 45 |
// A reported value can be in one of the following states: |
| 46 |
type Change_State int32 |
| 47 |
|
| 48 |
const ( |
| 49 |
// The element exists and its full value is included in data. |
| 50 |
Change_EXISTS Change_State = 0 |
| 51 |
// The element does not exist. |
| 52 |
Change_DOES_NOT_EXIST Change_State = 1 |
| 53 |
// Element may or may not exist. Used only for initial state delivery when |
| 54 |
// the client is not interested in fetching the initial state. See the |
| 55 |
// "Initial State" section above. |
| 56 |
Change_INITIAL_STATE_SKIPPED Change_State = 2 |
| 57 |
// The element may exist, but some error has occurred. More information is |
| 58 |
// available in the data field - the value is a serialized Status |
| 59 |
// proto (from [google.rpc.Status][]) |
| 60 |
Change_ERROR Change_State = 3 |
| 61 |
) |
| 62 |
|
| 63 |
// Enum value maps for Change_State. |
| 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 |
// Deprecated: Use Change_State.Descriptor instead. |
| 102 |
func (Change_State) EnumDescriptor() ([]byte, []int) { |
| 103 |
return file_google_watcher_v1_watch_proto_rawDescGZIP(), []int{2, 0} |
| 104 |
} |
| 105 |
|
| 106 |
// The message used by the client to register interest in an entity. |
| 107 |
type Request struct { |
| 108 |
state protoimpl.MessageState |
| 109 |
sizeCache protoimpl.SizeCache |
| 110 |
unknownFields protoimpl.UnknownFields |
| 111 |
|
| 112 |
// The `target` value **must** be a valid URL path pointing to an entity |
| 113 |
// to watch. Note that the service name **must** be |
| 114 |
// removed from the target field (e.g., the target field must say |
| 115 |
// "/foo/bar", not "myservice.googleapis.com/foo/bar"). A client is |
| 116 |
// also allowed to pass system-specific parameters in the URL that |
| 117 |
// are only obeyed by some implementations. Some parameters will be |
| 118 |
// implementation-specific. However, some have predefined meaning |
| 119 |
// and are listed here: |
| 120 |
// |
| 121 |
// - recursive = true|false [default=false] |
| 122 |
// If set to true, indicates that the client wants to watch all elements |
| 123 |
// of entities in the subtree rooted at the entity's name in `target`. For |
| 124 |
// descendants that are not the immediate children of the target, the |
| 125 |
// `Change.element` will contain slashes. |
| 126 |
// |
| 127 |
// Note that some namespaces and entities will not support recursive |
| 128 |
// watching. When watching such an entity, a client must not set recursive |
| 129 |
// to true. Otherwise, it will receive an `UNIMPLEMENTED` error. |
| 130 |
// |
| 131 |
// Normal URL encoding must be used inside `target`. For example, if a query |
| 132 |
// parameter name or value, or the non-query parameter portion of `target` |
| 133 |
// contains a special character, it must be %-encoded. We recommend that |
| 134 |
// clients and servers use their runtime's URL library to produce and consume |
| 135 |
// target values. |
| 136 |
Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"` |
| 137 |
// The `resume_marker` specifies how much of the existing underlying state is |
| 138 |
// delivered to the client when the watch request is received by the |
| 139 |
// system. The client can set this marker in one of the following ways to get |
| 140 |
// different semantics: |
| 141 |
// |
| 142 |
// - Parameter is not specified or has the value "". |
| 143 |
// Semantics: Fetch initial state. |
| 144 |
// The client wants the entity's initial state to be delivered. See the |
| 145 |
// description in "Initial State". |
| 146 |
// |
| 147 |
// - Parameter is set to the string "now" (UTF-8 encoding). |
| 148 |
// Semantics: Fetch new changes only. |
| 149 |
// The client just wants to get the changes received by the system after |
| 150 |
// the watch point. The system may deliver changes from before the watch |
| 151 |
// point as well. |
| 152 |
// |
| 153 |
// - Parameter is set to a value received in an earlier |
| 154 |
// `Change.resume_marker` field while watching the same entity. |
| 155 |
// Semantics: Resume from a specific point. |
| 156 |
// The client wants to receive the changes from a specific point; this |
| 157 |
// value must correspond to a value received in the `Change.resume_marker` |
| 158 |
// field. The system may deliver changes from before the `resume_marker` |
| 159 |
// as well. If the system cannot resume the stream from this point (e.g., |
| 160 |
// if it is too far behind in the stream), it can raise the |
| 161 |
// `FAILED_PRECONDITION` error. |
| 162 |
// |
| 163 |
// An implementation MUST support an unspecified parameter and the |
| 164 |
// empty string "" marker (initial state fetching) and the "now" marker. |
| 165 |
// It need not support resuming from a specific point. |
| 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 |
// Deprecated: Use Request.ProtoReflect.Descriptor instead. |
| 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 |
// A batch of Change messages. |
| 216 |
type ChangeBatch struct { |
| 217 |
state protoimpl.MessageState |
| 218 |
sizeCache protoimpl.SizeCache |
| 219 |
unknownFields protoimpl.UnknownFields |
| 220 |
|
| 221 |
// A list of Change messages. |
| 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 |
// Deprecated: Use ChangeBatch.ProtoReflect.Descriptor instead. |
| 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 |
// A Change indicates the most recent state of an element. |
| 265 |
type Change struct { |
| 266 |
state protoimpl.MessageState |
| 267 |
sizeCache protoimpl.SizeCache |
| 268 |
unknownFields protoimpl.UnknownFields |
| 269 |
|
| 270 |
// Name of the element, interpreted relative to the entity's actual |
| 271 |
// name. "" refers to the entity itself. The element name is a valid |
| 272 |
// UTF-8 string. |
| 273 |
Element string `protobuf:"bytes,1,opt,name=element,proto3" json:"element,omitempty"` |
| 274 |
// The state of the `element`. |
| 275 |
State Change_State `protobuf:"varint,2,opt,name=state,proto3,enum=google.watcher.v1.Change_State" json:"state,omitempty"` |
| 276 |
// The actual change data. This field is present only when `state() == EXISTS` |
| 277 |
// or `state() == ERROR`. Please see |
| 278 |
// [google.protobuf.Any][google.protobuf.Any] about how to use the Any type. |
| 279 |
Data *anypb.Any `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` |
| 280 |
// If present, provides a compact representation of all the messages that have |
| 281 |
// been received by the caller for the given entity, e.g., it could be a |
| 282 |
// sequence number or a multi-part timestamp/version vector. This marker can |
| 283 |
// be provided in the Request message, allowing the caller to resume the |
| 284 |
// stream watching at a specific point without fetching the initial state. |
| 285 |
ResumeMarker []byte `protobuf:"bytes,4,opt,name=resume_marker,json=resumeMarker,proto3" json:"resume_marker,omitempty"` |
| 286 |
// If true, this Change is followed by more Changes that are in the same group |
| 287 |
// as this Change. |
| 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 |
// Deprecated: Use Change.ProtoReflect.Descriptor instead. |
| 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), // 0: google.watcher.v1.Change.State |
| 427 |
(*Request)(nil), // 1: google.watcher.v1.Request |
| 428 |
(*ChangeBatch)(nil), // 2: google.watcher.v1.ChangeBatch |
| 429 |
(*Change)(nil), // 3: google.watcher.v1.Change |
| 430 |
(*anypb.Any)(nil), // 4: google.protobuf.Any |
| 431 |
} |
| 432 |
var file_google_watcher_v1_watch_proto_depIdxs = []int32{ |
| 433 |
3, // 0: google.watcher.v1.ChangeBatch.changes:type_name -> google.watcher.v1.Change |
| 434 |
0, // 1: google.watcher.v1.Change.state:type_name -> google.watcher.v1.Change.State |
| 435 |
4, // 2: google.watcher.v1.Change.data:type_name -> google.protobuf.Any |
| 436 |
1, // 3: google.watcher.v1.Watcher.Watch:input_type -> google.watcher.v1.Request |
| 437 |
2, // 4: google.watcher.v1.Watcher.Watch:output_type -> google.watcher.v1.ChangeBatch |
| 438 |
4, // [4:5] is the sub-list for method output_type |
| 439 |
3, // [3:4] is the sub-list for method input_type |
| 440 |
3, // [3:3] is the sub-list for extension type_name |
| 441 |
3, // [3:3] is the sub-list for extension extendee |
| 442 |
0, // [0:3] is the sub-list for field type_name |
| 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 |
// Reference imports to suppress errors if they are not otherwise used. |
| 510 |
var _ context.Context |
| 511 |
var _ grpc.ClientConnInterface |
| 512 |
|
| 513 |
// This is a compile-time assertion to ensure that this generated file |
| 514 |
// is compatible with the grpc package it is being compiled against. |
| 515 |
const _ = grpc.SupportPackageIsVersion6 |
| 516 |
|
| 517 |
// WatcherClient is the client API for Watcher service. |
| 518 |
// |
| 519 |
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. |
| 520 |
type WatcherClient interface { |
| 521 |
// Start a streaming RPC to get watch information from the server. |
| 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 |
// WatcherServer is the server API for Watcher service. |
| 566 |
type WatcherServer interface { |
| 567 |
// Start a streaming RPC to get watch information from the server. |
| 568 |
Watch(*Request, Watcher_WatchServer) error |
| 569 |
} |
| 570 |
|
| 571 |
// UnimplementedWatcherServer can be embedded to have forward compatible implementations. |
| 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 |
} |