1// Code generated by protoc-gen-gogo. DO NOT EDIT. 2// source: github.com/docker/swarmkit/api/watch.proto 3 4package api 5 6import proto "github.com/gogo/protobuf/proto" 7import fmt "fmt" 8import math "math" 9import _ "github.com/gogo/protobuf/gogoproto" 10import _ "github.com/docker/swarmkit/protobuf/plugin" 11 12import deepcopy "github.com/docker/swarmkit/api/deepcopy" 13 14import context "golang.org/x/net/context" 15import grpc "google.golang.org/grpc" 16 17import raftselector "github.com/docker/swarmkit/manager/raftselector" 18import codes "google.golang.org/grpc/codes" 19import status "google.golang.org/grpc/status" 20import metadata "google.golang.org/grpc/metadata" 21import peer "google.golang.org/grpc/peer" 22import rafttime "time" 23 24import strings "strings" 25import reflect "reflect" 26 27import io "io" 28 29// Reference imports to suppress errors if they are not otherwise used. 30var _ = proto.Marshal 31var _ = fmt.Errorf 32var _ = math.Inf 33 34// WatchActionKind distinguishes between creations, updates, and removals. It 35// is structured as a bitmap so multiple kinds of events can be requested with 36// a mask. 37type WatchActionKind int32 38 39const ( 40 WatchActionKindUnknown WatchActionKind = 0 41 WatchActionKindCreate WatchActionKind = 1 42 WatchActionKindUpdate WatchActionKind = 2 43 WatchActionKindRemove WatchActionKind = 4 44) 45 46var WatchActionKind_name = map[int32]string{ 47 0: "WATCH_ACTION_UNKNOWN", 48 1: "WATCH_ACTION_CREATE", 49 2: "WATCH_ACTION_UPDATE", 50 4: "WATCH_ACTION_REMOVE", 51} 52var WatchActionKind_value = map[string]int32{ 53 "WATCH_ACTION_UNKNOWN": 0, 54 "WATCH_ACTION_CREATE": 1, 55 "WATCH_ACTION_UPDATE": 2, 56 "WATCH_ACTION_REMOVE": 4, 57} 58 59func (x WatchActionKind) String() string { 60 return proto.EnumName(WatchActionKind_name, int32(x)) 61} 62func (WatchActionKind) EnumDescriptor() ([]byte, []int) { return fileDescriptorWatch, []int{0} } 63 64type Object struct { 65 // Types that are valid to be assigned to Object: 66 // *Object_Node 67 // *Object_Service 68 // *Object_Network 69 // *Object_Task 70 // *Object_Cluster 71 // *Object_Secret 72 // *Object_Resource 73 // *Object_Extension 74 // *Object_Config 75 Object isObject_Object `protobuf_oneof:"Object"` 76} 77 78func (m *Object) Reset() { *m = Object{} } 79func (*Object) ProtoMessage() {} 80func (*Object) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{0} } 81 82type isObject_Object interface { 83 isObject_Object() 84 MarshalTo([]byte) (int, error) 85 Size() int 86} 87 88type Object_Node struct { 89 Node *Node `protobuf:"bytes,1,opt,name=node,oneof"` 90} 91type Object_Service struct { 92 Service *Service `protobuf:"bytes,2,opt,name=service,oneof"` 93} 94type Object_Network struct { 95 Network *Network `protobuf:"bytes,3,opt,name=network,oneof"` 96} 97type Object_Task struct { 98 Task *Task `protobuf:"bytes,4,opt,name=task,oneof"` 99} 100type Object_Cluster struct { 101 Cluster *Cluster `protobuf:"bytes,5,opt,name=cluster,oneof"` 102} 103type Object_Secret struct { 104 Secret *Secret `protobuf:"bytes,6,opt,name=secret,oneof"` 105} 106type Object_Resource struct { 107 Resource *Resource `protobuf:"bytes,7,opt,name=resource,oneof"` 108} 109type Object_Extension struct { 110 Extension *Extension `protobuf:"bytes,8,opt,name=extension,oneof"` 111} 112type Object_Config struct { 113 Config *Config `protobuf:"bytes,9,opt,name=config,oneof"` 114} 115 116func (*Object_Node) isObject_Object() {} 117func (*Object_Service) isObject_Object() {} 118func (*Object_Network) isObject_Object() {} 119func (*Object_Task) isObject_Object() {} 120func (*Object_Cluster) isObject_Object() {} 121func (*Object_Secret) isObject_Object() {} 122func (*Object_Resource) isObject_Object() {} 123func (*Object_Extension) isObject_Object() {} 124func (*Object_Config) isObject_Object() {} 125 126func (m *Object) GetObject() isObject_Object { 127 if m != nil { 128 return m.Object 129 } 130 return nil 131} 132 133func (m *Object) GetNode() *Node { 134 if x, ok := m.GetObject().(*Object_Node); ok { 135 return x.Node 136 } 137 return nil 138} 139 140func (m *Object) GetService() *Service { 141 if x, ok := m.GetObject().(*Object_Service); ok { 142 return x.Service 143 } 144 return nil 145} 146 147func (m *Object) GetNetwork() *Network { 148 if x, ok := m.GetObject().(*Object_Network); ok { 149 return x.Network 150 } 151 return nil 152} 153 154func (m *Object) GetTask() *Task { 155 if x, ok := m.GetObject().(*Object_Task); ok { 156 return x.Task 157 } 158 return nil 159} 160 161func (m *Object) GetCluster() *Cluster { 162 if x, ok := m.GetObject().(*Object_Cluster); ok { 163 return x.Cluster 164 } 165 return nil 166} 167 168func (m *Object) GetSecret() *Secret { 169 if x, ok := m.GetObject().(*Object_Secret); ok { 170 return x.Secret 171 } 172 return nil 173} 174 175func (m *Object) GetResource() *Resource { 176 if x, ok := m.GetObject().(*Object_Resource); ok { 177 return x.Resource 178 } 179 return nil 180} 181 182func (m *Object) GetExtension() *Extension { 183 if x, ok := m.GetObject().(*Object_Extension); ok { 184 return x.Extension 185 } 186 return nil 187} 188 189func (m *Object) GetConfig() *Config { 190 if x, ok := m.GetObject().(*Object_Config); ok { 191 return x.Config 192 } 193 return nil 194} 195 196// XXX_OneofFuncs is for the internal use of the proto package. 197func (*Object) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { 198 return _Object_OneofMarshaler, _Object_OneofUnmarshaler, _Object_OneofSizer, []interface{}{ 199 (*Object_Node)(nil), 200 (*Object_Service)(nil), 201 (*Object_Network)(nil), 202 (*Object_Task)(nil), 203 (*Object_Cluster)(nil), 204 (*Object_Secret)(nil), 205 (*Object_Resource)(nil), 206 (*Object_Extension)(nil), 207 (*Object_Config)(nil), 208 } 209} 210 211func _Object_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 212 m := msg.(*Object) 213 // Object 214 switch x := m.Object.(type) { 215 case *Object_Node: 216 _ = b.EncodeVarint(1<<3 | proto.WireBytes) 217 if err := b.EncodeMessage(x.Node); err != nil { 218 return err 219 } 220 case *Object_Service: 221 _ = b.EncodeVarint(2<<3 | proto.WireBytes) 222 if err := b.EncodeMessage(x.Service); err != nil { 223 return err 224 } 225 case *Object_Network: 226 _ = b.EncodeVarint(3<<3 | proto.WireBytes) 227 if err := b.EncodeMessage(x.Network); err != nil { 228 return err 229 } 230 case *Object_Task: 231 _ = b.EncodeVarint(4<<3 | proto.WireBytes) 232 if err := b.EncodeMessage(x.Task); err != nil { 233 return err 234 } 235 case *Object_Cluster: 236 _ = b.EncodeVarint(5<<3 | proto.WireBytes) 237 if err := b.EncodeMessage(x.Cluster); err != nil { 238 return err 239 } 240 case *Object_Secret: 241 _ = b.EncodeVarint(6<<3 | proto.WireBytes) 242 if err := b.EncodeMessage(x.Secret); err != nil { 243 return err 244 } 245 case *Object_Resource: 246 _ = b.EncodeVarint(7<<3 | proto.WireBytes) 247 if err := b.EncodeMessage(x.Resource); err != nil { 248 return err 249 } 250 case *Object_Extension: 251 _ = b.EncodeVarint(8<<3 | proto.WireBytes) 252 if err := b.EncodeMessage(x.Extension); err != nil { 253 return err 254 } 255 case *Object_Config: 256 _ = b.EncodeVarint(9<<3 | proto.WireBytes) 257 if err := b.EncodeMessage(x.Config); err != nil { 258 return err 259 } 260 case nil: 261 default: 262 return fmt.Errorf("Object.Object has unexpected type %T", x) 263 } 264 return nil 265} 266 267func _Object_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 268 m := msg.(*Object) 269 switch tag { 270 case 1: // Object.node 271 if wire != proto.WireBytes { 272 return true, proto.ErrInternalBadWireType 273 } 274 msg := new(Node) 275 err := b.DecodeMessage(msg) 276 m.Object = &Object_Node{msg} 277 return true, err 278 case 2: // Object.service 279 if wire != proto.WireBytes { 280 return true, proto.ErrInternalBadWireType 281 } 282 msg := new(Service) 283 err := b.DecodeMessage(msg) 284 m.Object = &Object_Service{msg} 285 return true, err 286 case 3: // Object.network 287 if wire != proto.WireBytes { 288 return true, proto.ErrInternalBadWireType 289 } 290 msg := new(Network) 291 err := b.DecodeMessage(msg) 292 m.Object = &Object_Network{msg} 293 return true, err 294 case 4: // Object.task 295 if wire != proto.WireBytes { 296 return true, proto.ErrInternalBadWireType 297 } 298 msg := new(Task) 299 err := b.DecodeMessage(msg) 300 m.Object = &Object_Task{msg} 301 return true, err 302 case 5: // Object.cluster 303 if wire != proto.WireBytes { 304 return true, proto.ErrInternalBadWireType 305 } 306 msg := new(Cluster) 307 err := b.DecodeMessage(msg) 308 m.Object = &Object_Cluster{msg} 309 return true, err 310 case 6: // Object.secret 311 if wire != proto.WireBytes { 312 return true, proto.ErrInternalBadWireType 313 } 314 msg := new(Secret) 315 err := b.DecodeMessage(msg) 316 m.Object = &Object_Secret{msg} 317 return true, err 318 case 7: // Object.resource 319 if wire != proto.WireBytes { 320 return true, proto.ErrInternalBadWireType 321 } 322 msg := new(Resource) 323 err := b.DecodeMessage(msg) 324 m.Object = &Object_Resource{msg} 325 return true, err 326 case 8: // Object.extension 327 if wire != proto.WireBytes { 328 return true, proto.ErrInternalBadWireType 329 } 330 msg := new(Extension) 331 err := b.DecodeMessage(msg) 332 m.Object = &Object_Extension{msg} 333 return true, err 334 case 9: // Object.config 335 if wire != proto.WireBytes { 336 return true, proto.ErrInternalBadWireType 337 } 338 msg := new(Config) 339 err := b.DecodeMessage(msg) 340 m.Object = &Object_Config{msg} 341 return true, err 342 default: 343 return false, nil 344 } 345} 346 347func _Object_OneofSizer(msg proto.Message) (n int) { 348 m := msg.(*Object) 349 // Object 350 switch x := m.Object.(type) { 351 case *Object_Node: 352 s := proto.Size(x.Node) 353 n += proto.SizeVarint(1<<3 | proto.WireBytes) 354 n += proto.SizeVarint(uint64(s)) 355 n += s 356 case *Object_Service: 357 s := proto.Size(x.Service) 358 n += proto.SizeVarint(2<<3 | proto.WireBytes) 359 n += proto.SizeVarint(uint64(s)) 360 n += s 361 case *Object_Network: 362 s := proto.Size(x.Network) 363 n += proto.SizeVarint(3<<3 | proto.WireBytes) 364 n += proto.SizeVarint(uint64(s)) 365 n += s 366 case *Object_Task: 367 s := proto.Size(x.Task) 368 n += proto.SizeVarint(4<<3 | proto.WireBytes) 369 n += proto.SizeVarint(uint64(s)) 370 n += s 371 case *Object_Cluster: 372 s := proto.Size(x.Cluster) 373 n += proto.SizeVarint(5<<3 | proto.WireBytes) 374 n += proto.SizeVarint(uint64(s)) 375 n += s 376 case *Object_Secret: 377 s := proto.Size(x.Secret) 378 n += proto.SizeVarint(6<<3 | proto.WireBytes) 379 n += proto.SizeVarint(uint64(s)) 380 n += s 381 case *Object_Resource: 382 s := proto.Size(x.Resource) 383 n += proto.SizeVarint(7<<3 | proto.WireBytes) 384 n += proto.SizeVarint(uint64(s)) 385 n += s 386 case *Object_Extension: 387 s := proto.Size(x.Extension) 388 n += proto.SizeVarint(8<<3 | proto.WireBytes) 389 n += proto.SizeVarint(uint64(s)) 390 n += s 391 case *Object_Config: 392 s := proto.Size(x.Config) 393 n += proto.SizeVarint(9<<3 | proto.WireBytes) 394 n += proto.SizeVarint(uint64(s)) 395 n += s 396 case nil: 397 default: 398 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 399 } 400 return n 401} 402 403// FIXME(aaronl): These messages should ideally be embedded in SelectBy, but 404// protoc generates bad code for that. 405type SelectBySlot struct { 406 ServiceID string `protobuf:"bytes,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"` 407 Slot uint64 `protobuf:"varint,2,opt,name=slot,proto3" json:"slot,omitempty"` 408} 409 410func (m *SelectBySlot) Reset() { *m = SelectBySlot{} } 411func (*SelectBySlot) ProtoMessage() {} 412func (*SelectBySlot) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{1} } 413 414type SelectByCustom struct { 415 Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` 416 Index string `protobuf:"bytes,2,opt,name=index,proto3" json:"index,omitempty"` 417 Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` 418} 419 420func (m *SelectByCustom) Reset() { *m = SelectByCustom{} } 421func (*SelectByCustom) ProtoMessage() {} 422func (*SelectByCustom) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{2} } 423 424type SelectBy struct { 425 // TODO(aaronl): Are all of these things we want to expose in 426 // the API? Exposing them may commit us to maintaining those 427 // internal indices going forward. 428 // 429 // Types that are valid to be assigned to By: 430 // *SelectBy_ID 431 // *SelectBy_IDPrefix 432 // *SelectBy_Name 433 // *SelectBy_NamePrefix 434 // *SelectBy_Custom 435 // *SelectBy_CustomPrefix 436 // *SelectBy_ServiceID 437 // *SelectBy_NodeID 438 // *SelectBy_Slot 439 // *SelectBy_DesiredState 440 // *SelectBy_Role 441 // *SelectBy_Membership 442 // *SelectBy_ReferencedNetworkID 443 // *SelectBy_ReferencedSecretID 444 // *SelectBy_ReferencedConfigID 445 // *SelectBy_Kind 446 By isSelectBy_By `protobuf_oneof:"By"` 447} 448 449func (m *SelectBy) Reset() { *m = SelectBy{} } 450func (*SelectBy) ProtoMessage() {} 451func (*SelectBy) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{3} } 452 453type isSelectBy_By interface { 454 isSelectBy_By() 455 MarshalTo([]byte) (int, error) 456 Size() int 457} 458 459type SelectBy_ID struct { 460 ID string `protobuf:"bytes,1,opt,name=id,proto3,oneof"` 461} 462type SelectBy_IDPrefix struct { 463 IDPrefix string `protobuf:"bytes,2,opt,name=id_prefix,json=idPrefix,proto3,oneof"` 464} 465type SelectBy_Name struct { 466 Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof"` 467} 468type SelectBy_NamePrefix struct { 469 NamePrefix string `protobuf:"bytes,4,opt,name=name_prefix,json=namePrefix,proto3,oneof"` 470} 471type SelectBy_Custom struct { 472 Custom *SelectByCustom `protobuf:"bytes,5,opt,name=custom,oneof"` 473} 474type SelectBy_CustomPrefix struct { 475 CustomPrefix *SelectByCustom `protobuf:"bytes,6,opt,name=custom_prefix,json=customPrefix,oneof"` 476} 477type SelectBy_ServiceID struct { 478 ServiceID string `protobuf:"bytes,7,opt,name=service_id,json=serviceId,proto3,oneof"` 479} 480type SelectBy_NodeID struct { 481 NodeID string `protobuf:"bytes,8,opt,name=node_id,json=nodeId,proto3,oneof"` 482} 483type SelectBy_Slot struct { 484 Slot *SelectBySlot `protobuf:"bytes,9,opt,name=slot,oneof"` 485} 486type SelectBy_DesiredState struct { 487 DesiredState TaskState `protobuf:"varint,10,opt,name=desired_state,json=desiredState,proto3,enum=docker.swarmkit.v1.TaskState,oneof"` 488} 489type SelectBy_Role struct { 490 Role NodeRole `protobuf:"varint,11,opt,name=role,proto3,enum=docker.swarmkit.v1.NodeRole,oneof"` 491} 492type SelectBy_Membership struct { 493 Membership NodeSpec_Membership `protobuf:"varint,12,opt,name=membership,proto3,enum=docker.swarmkit.v1.NodeSpec_Membership,oneof"` 494} 495type SelectBy_ReferencedNetworkID struct { 496 ReferencedNetworkID string `protobuf:"bytes,13,opt,name=referenced_network_id,json=referencedNetworkId,proto3,oneof"` 497} 498type SelectBy_ReferencedSecretID struct { 499 ReferencedSecretID string `protobuf:"bytes,14,opt,name=referenced_secret_id,json=referencedSecretId,proto3,oneof"` 500} 501type SelectBy_ReferencedConfigID struct { 502 ReferencedConfigID string `protobuf:"bytes,16,opt,name=referenced_config_id,json=referencedConfigId,proto3,oneof"` 503} 504type SelectBy_Kind struct { 505 Kind string `protobuf:"bytes,15,opt,name=kind,proto3,oneof"` 506} 507 508func (*SelectBy_ID) isSelectBy_By() {} 509func (*SelectBy_IDPrefix) isSelectBy_By() {} 510func (*SelectBy_Name) isSelectBy_By() {} 511func (*SelectBy_NamePrefix) isSelectBy_By() {} 512func (*SelectBy_Custom) isSelectBy_By() {} 513func (*SelectBy_CustomPrefix) isSelectBy_By() {} 514func (*SelectBy_ServiceID) isSelectBy_By() {} 515func (*SelectBy_NodeID) isSelectBy_By() {} 516func (*SelectBy_Slot) isSelectBy_By() {} 517func (*SelectBy_DesiredState) isSelectBy_By() {} 518func (*SelectBy_Role) isSelectBy_By() {} 519func (*SelectBy_Membership) isSelectBy_By() {} 520func (*SelectBy_ReferencedNetworkID) isSelectBy_By() {} 521func (*SelectBy_ReferencedSecretID) isSelectBy_By() {} 522func (*SelectBy_ReferencedConfigID) isSelectBy_By() {} 523func (*SelectBy_Kind) isSelectBy_By() {} 524 525func (m *SelectBy) GetBy() isSelectBy_By { 526 if m != nil { 527 return m.By 528 } 529 return nil 530} 531 532func (m *SelectBy) GetID() string { 533 if x, ok := m.GetBy().(*SelectBy_ID); ok { 534 return x.ID 535 } 536 return "" 537} 538 539func (m *SelectBy) GetIDPrefix() string { 540 if x, ok := m.GetBy().(*SelectBy_IDPrefix); ok { 541 return x.IDPrefix 542 } 543 return "" 544} 545 546func (m *SelectBy) GetName() string { 547 if x, ok := m.GetBy().(*SelectBy_Name); ok { 548 return x.Name 549 } 550 return "" 551} 552 553func (m *SelectBy) GetNamePrefix() string { 554 if x, ok := m.GetBy().(*SelectBy_NamePrefix); ok { 555 return x.NamePrefix 556 } 557 return "" 558} 559 560func (m *SelectBy) GetCustom() *SelectByCustom { 561 if x, ok := m.GetBy().(*SelectBy_Custom); ok { 562 return x.Custom 563 } 564 return nil 565} 566 567func (m *SelectBy) GetCustomPrefix() *SelectByCustom { 568 if x, ok := m.GetBy().(*SelectBy_CustomPrefix); ok { 569 return x.CustomPrefix 570 } 571 return nil 572} 573 574func (m *SelectBy) GetServiceID() string { 575 if x, ok := m.GetBy().(*SelectBy_ServiceID); ok { 576 return x.ServiceID 577 } 578 return "" 579} 580 581func (m *SelectBy) GetNodeID() string { 582 if x, ok := m.GetBy().(*SelectBy_NodeID); ok { 583 return x.NodeID 584 } 585 return "" 586} 587 588func (m *SelectBy) GetSlot() *SelectBySlot { 589 if x, ok := m.GetBy().(*SelectBy_Slot); ok { 590 return x.Slot 591 } 592 return nil 593} 594 595func (m *SelectBy) GetDesiredState() TaskState { 596 if x, ok := m.GetBy().(*SelectBy_DesiredState); ok { 597 return x.DesiredState 598 } 599 return TaskStateNew 600} 601 602func (m *SelectBy) GetRole() NodeRole { 603 if x, ok := m.GetBy().(*SelectBy_Role); ok { 604 return x.Role 605 } 606 return NodeRoleWorker 607} 608 609func (m *SelectBy) GetMembership() NodeSpec_Membership { 610 if x, ok := m.GetBy().(*SelectBy_Membership); ok { 611 return x.Membership 612 } 613 return NodeMembershipPending 614} 615 616func (m *SelectBy) GetReferencedNetworkID() string { 617 if x, ok := m.GetBy().(*SelectBy_ReferencedNetworkID); ok { 618 return x.ReferencedNetworkID 619 } 620 return "" 621} 622 623func (m *SelectBy) GetReferencedSecretID() string { 624 if x, ok := m.GetBy().(*SelectBy_ReferencedSecretID); ok { 625 return x.ReferencedSecretID 626 } 627 return "" 628} 629 630func (m *SelectBy) GetReferencedConfigID() string { 631 if x, ok := m.GetBy().(*SelectBy_ReferencedConfigID); ok { 632 return x.ReferencedConfigID 633 } 634 return "" 635} 636 637func (m *SelectBy) GetKind() string { 638 if x, ok := m.GetBy().(*SelectBy_Kind); ok { 639 return x.Kind 640 } 641 return "" 642} 643 644// XXX_OneofFuncs is for the internal use of the proto package. 645func (*SelectBy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { 646 return _SelectBy_OneofMarshaler, _SelectBy_OneofUnmarshaler, _SelectBy_OneofSizer, []interface{}{ 647 (*SelectBy_ID)(nil), 648 (*SelectBy_IDPrefix)(nil), 649 (*SelectBy_Name)(nil), 650 (*SelectBy_NamePrefix)(nil), 651 (*SelectBy_Custom)(nil), 652 (*SelectBy_CustomPrefix)(nil), 653 (*SelectBy_ServiceID)(nil), 654 (*SelectBy_NodeID)(nil), 655 (*SelectBy_Slot)(nil), 656 (*SelectBy_DesiredState)(nil), 657 (*SelectBy_Role)(nil), 658 (*SelectBy_Membership)(nil), 659 (*SelectBy_ReferencedNetworkID)(nil), 660 (*SelectBy_ReferencedSecretID)(nil), 661 (*SelectBy_ReferencedConfigID)(nil), 662 (*SelectBy_Kind)(nil), 663 } 664} 665 666func _SelectBy_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { 667 m := msg.(*SelectBy) 668 // By 669 switch x := m.By.(type) { 670 case *SelectBy_ID: 671 _ = b.EncodeVarint(1<<3 | proto.WireBytes) 672 _ = b.EncodeStringBytes(x.ID) 673 case *SelectBy_IDPrefix: 674 _ = b.EncodeVarint(2<<3 | proto.WireBytes) 675 _ = b.EncodeStringBytes(x.IDPrefix) 676 case *SelectBy_Name: 677 _ = b.EncodeVarint(3<<3 | proto.WireBytes) 678 _ = b.EncodeStringBytes(x.Name) 679 case *SelectBy_NamePrefix: 680 _ = b.EncodeVarint(4<<3 | proto.WireBytes) 681 _ = b.EncodeStringBytes(x.NamePrefix) 682 case *SelectBy_Custom: 683 _ = b.EncodeVarint(5<<3 | proto.WireBytes) 684 if err := b.EncodeMessage(x.Custom); err != nil { 685 return err 686 } 687 case *SelectBy_CustomPrefix: 688 _ = b.EncodeVarint(6<<3 | proto.WireBytes) 689 if err := b.EncodeMessage(x.CustomPrefix); err != nil { 690 return err 691 } 692 case *SelectBy_ServiceID: 693 _ = b.EncodeVarint(7<<3 | proto.WireBytes) 694 _ = b.EncodeStringBytes(x.ServiceID) 695 case *SelectBy_NodeID: 696 _ = b.EncodeVarint(8<<3 | proto.WireBytes) 697 _ = b.EncodeStringBytes(x.NodeID) 698 case *SelectBy_Slot: 699 _ = b.EncodeVarint(9<<3 | proto.WireBytes) 700 if err := b.EncodeMessage(x.Slot); err != nil { 701 return err 702 } 703 case *SelectBy_DesiredState: 704 _ = b.EncodeVarint(10<<3 | proto.WireVarint) 705 _ = b.EncodeVarint(uint64(x.DesiredState)) 706 case *SelectBy_Role: 707 _ = b.EncodeVarint(11<<3 | proto.WireVarint) 708 _ = b.EncodeVarint(uint64(x.Role)) 709 case *SelectBy_Membership: 710 _ = b.EncodeVarint(12<<3 | proto.WireVarint) 711 _ = b.EncodeVarint(uint64(x.Membership)) 712 case *SelectBy_ReferencedNetworkID: 713 _ = b.EncodeVarint(13<<3 | proto.WireBytes) 714 _ = b.EncodeStringBytes(x.ReferencedNetworkID) 715 case *SelectBy_ReferencedSecretID: 716 _ = b.EncodeVarint(14<<3 | proto.WireBytes) 717 _ = b.EncodeStringBytes(x.ReferencedSecretID) 718 case *SelectBy_ReferencedConfigID: 719 _ = b.EncodeVarint(16<<3 | proto.WireBytes) 720 _ = b.EncodeStringBytes(x.ReferencedConfigID) 721 case *SelectBy_Kind: 722 _ = b.EncodeVarint(15<<3 | proto.WireBytes) 723 _ = b.EncodeStringBytes(x.Kind) 724 case nil: 725 default: 726 return fmt.Errorf("SelectBy.By has unexpected type %T", x) 727 } 728 return nil 729} 730 731func _SelectBy_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { 732 m := msg.(*SelectBy) 733 switch tag { 734 case 1: // By.id 735 if wire != proto.WireBytes { 736 return true, proto.ErrInternalBadWireType 737 } 738 x, err := b.DecodeStringBytes() 739 m.By = &SelectBy_ID{x} 740 return true, err 741 case 2: // By.id_prefix 742 if wire != proto.WireBytes { 743 return true, proto.ErrInternalBadWireType 744 } 745 x, err := b.DecodeStringBytes() 746 m.By = &SelectBy_IDPrefix{x} 747 return true, err 748 case 3: // By.name 749 if wire != proto.WireBytes { 750 return true, proto.ErrInternalBadWireType 751 } 752 x, err := b.DecodeStringBytes() 753 m.By = &SelectBy_Name{x} 754 return true, err 755 case 4: // By.name_prefix 756 if wire != proto.WireBytes { 757 return true, proto.ErrInternalBadWireType 758 } 759 x, err := b.DecodeStringBytes() 760 m.By = &SelectBy_NamePrefix{x} 761 return true, err 762 case 5: // By.custom 763 if wire != proto.WireBytes { 764 return true, proto.ErrInternalBadWireType 765 } 766 msg := new(SelectByCustom) 767 err := b.DecodeMessage(msg) 768 m.By = &SelectBy_Custom{msg} 769 return true, err 770 case 6: // By.custom_prefix 771 if wire != proto.WireBytes { 772 return true, proto.ErrInternalBadWireType 773 } 774 msg := new(SelectByCustom) 775 err := b.DecodeMessage(msg) 776 m.By = &SelectBy_CustomPrefix{msg} 777 return true, err 778 case 7: // By.service_id 779 if wire != proto.WireBytes { 780 return true, proto.ErrInternalBadWireType 781 } 782 x, err := b.DecodeStringBytes() 783 m.By = &SelectBy_ServiceID{x} 784 return true, err 785 case 8: // By.node_id 786 if wire != proto.WireBytes { 787 return true, proto.ErrInternalBadWireType 788 } 789 x, err := b.DecodeStringBytes() 790 m.By = &SelectBy_NodeID{x} 791 return true, err 792 case 9: // By.slot 793 if wire != proto.WireBytes { 794 return true, proto.ErrInternalBadWireType 795 } 796 msg := new(SelectBySlot) 797 err := b.DecodeMessage(msg) 798 m.By = &SelectBy_Slot{msg} 799 return true, err 800 case 10: // By.desired_state 801 if wire != proto.WireVarint { 802 return true, proto.ErrInternalBadWireType 803 } 804 x, err := b.DecodeVarint() 805 m.By = &SelectBy_DesiredState{TaskState(x)} 806 return true, err 807 case 11: // By.role 808 if wire != proto.WireVarint { 809 return true, proto.ErrInternalBadWireType 810 } 811 x, err := b.DecodeVarint() 812 m.By = &SelectBy_Role{NodeRole(x)} 813 return true, err 814 case 12: // By.membership 815 if wire != proto.WireVarint { 816 return true, proto.ErrInternalBadWireType 817 } 818 x, err := b.DecodeVarint() 819 m.By = &SelectBy_Membership{NodeSpec_Membership(x)} 820 return true, err 821 case 13: // By.referenced_network_id 822 if wire != proto.WireBytes { 823 return true, proto.ErrInternalBadWireType 824 } 825 x, err := b.DecodeStringBytes() 826 m.By = &SelectBy_ReferencedNetworkID{x} 827 return true, err 828 case 14: // By.referenced_secret_id 829 if wire != proto.WireBytes { 830 return true, proto.ErrInternalBadWireType 831 } 832 x, err := b.DecodeStringBytes() 833 m.By = &SelectBy_ReferencedSecretID{x} 834 return true, err 835 case 16: // By.referenced_config_id 836 if wire != proto.WireBytes { 837 return true, proto.ErrInternalBadWireType 838 } 839 x, err := b.DecodeStringBytes() 840 m.By = &SelectBy_ReferencedConfigID{x} 841 return true, err 842 case 15: // By.kind 843 if wire != proto.WireBytes { 844 return true, proto.ErrInternalBadWireType 845 } 846 x, err := b.DecodeStringBytes() 847 m.By = &SelectBy_Kind{x} 848 return true, err 849 default: 850 return false, nil 851 } 852} 853 854func _SelectBy_OneofSizer(msg proto.Message) (n int) { 855 m := msg.(*SelectBy) 856 // By 857 switch x := m.By.(type) { 858 case *SelectBy_ID: 859 n += proto.SizeVarint(1<<3 | proto.WireBytes) 860 n += proto.SizeVarint(uint64(len(x.ID))) 861 n += len(x.ID) 862 case *SelectBy_IDPrefix: 863 n += proto.SizeVarint(2<<3 | proto.WireBytes) 864 n += proto.SizeVarint(uint64(len(x.IDPrefix))) 865 n += len(x.IDPrefix) 866 case *SelectBy_Name: 867 n += proto.SizeVarint(3<<3 | proto.WireBytes) 868 n += proto.SizeVarint(uint64(len(x.Name))) 869 n += len(x.Name) 870 case *SelectBy_NamePrefix: 871 n += proto.SizeVarint(4<<3 | proto.WireBytes) 872 n += proto.SizeVarint(uint64(len(x.NamePrefix))) 873 n += len(x.NamePrefix) 874 case *SelectBy_Custom: 875 s := proto.Size(x.Custom) 876 n += proto.SizeVarint(5<<3 | proto.WireBytes) 877 n += proto.SizeVarint(uint64(s)) 878 n += s 879 case *SelectBy_CustomPrefix: 880 s := proto.Size(x.CustomPrefix) 881 n += proto.SizeVarint(6<<3 | proto.WireBytes) 882 n += proto.SizeVarint(uint64(s)) 883 n += s 884 case *SelectBy_ServiceID: 885 n += proto.SizeVarint(7<<3 | proto.WireBytes) 886 n += proto.SizeVarint(uint64(len(x.ServiceID))) 887 n += len(x.ServiceID) 888 case *SelectBy_NodeID: 889 n += proto.SizeVarint(8<<3 | proto.WireBytes) 890 n += proto.SizeVarint(uint64(len(x.NodeID))) 891 n += len(x.NodeID) 892 case *SelectBy_Slot: 893 s := proto.Size(x.Slot) 894 n += proto.SizeVarint(9<<3 | proto.WireBytes) 895 n += proto.SizeVarint(uint64(s)) 896 n += s 897 case *SelectBy_DesiredState: 898 n += proto.SizeVarint(10<<3 | proto.WireVarint) 899 n += proto.SizeVarint(uint64(x.DesiredState)) 900 case *SelectBy_Role: 901 n += proto.SizeVarint(11<<3 | proto.WireVarint) 902 n += proto.SizeVarint(uint64(x.Role)) 903 case *SelectBy_Membership: 904 n += proto.SizeVarint(12<<3 | proto.WireVarint) 905 n += proto.SizeVarint(uint64(x.Membership)) 906 case *SelectBy_ReferencedNetworkID: 907 n += proto.SizeVarint(13<<3 | proto.WireBytes) 908 n += proto.SizeVarint(uint64(len(x.ReferencedNetworkID))) 909 n += len(x.ReferencedNetworkID) 910 case *SelectBy_ReferencedSecretID: 911 n += proto.SizeVarint(14<<3 | proto.WireBytes) 912 n += proto.SizeVarint(uint64(len(x.ReferencedSecretID))) 913 n += len(x.ReferencedSecretID) 914 case *SelectBy_ReferencedConfigID: 915 n += proto.SizeVarint(16<<3 | proto.WireBytes) 916 n += proto.SizeVarint(uint64(len(x.ReferencedConfigID))) 917 n += len(x.ReferencedConfigID) 918 case *SelectBy_Kind: 919 n += proto.SizeVarint(15<<3 | proto.WireBytes) 920 n += proto.SizeVarint(uint64(len(x.Kind))) 921 n += len(x.Kind) 922 case nil: 923 default: 924 panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) 925 } 926 return n 927} 928 929type WatchRequest struct { 930 // Multiple entries are combined using OR logic - i.e. if an event 931 // matches all of the selectors specified in any single watch entry, 932 // the event will be sent to the client. 933 Entries []*WatchRequest_WatchEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"` 934 // ResumeFrom provides an version to resume the watch from, if non-nil. 935 // The watch will return changes since this version, and continue to 936 // return new changes afterwards. Watch will return an error if the 937 // server has compacted its log and no longer has complete history to 938 // this point. 939 ResumeFrom *Version `protobuf:"bytes,2,opt,name=resume_from,json=resumeFrom" json:"resume_from,omitempty"` 940 // IncludeOldObject causes WatchMessages to include a copy of the 941 // previous version of the object on updates. Note that only live 942 // changes will include the old object (not historical changes 943 // retrieved using ResumeFrom). 944 IncludeOldObject bool `protobuf:"varint,3,opt,name=include_old_object,json=includeOldObject,proto3" json:"include_old_object,omitempty"` 945} 946 947func (m *WatchRequest) Reset() { *m = WatchRequest{} } 948func (*WatchRequest) ProtoMessage() {} 949func (*WatchRequest) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{4} } 950 951type WatchRequest_WatchEntry struct { 952 // Kind can contain a builtin type such as "node", "secret", etc. or 953 // the kind specified by a custom-defined object. 954 Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` 955 // Action (create/update/delete) 956 // This is a bitmask, so multiple actions may be OR'd together 957 Action WatchActionKind `protobuf:"varint,2,opt,name=action,proto3,enum=docker.swarmkit.v1.WatchActionKind" json:"action,omitempty"` 958 // Filters are combined using AND logic - an event must match 959 // all of them to pass the filter. 960 Filters []*SelectBy `protobuf:"bytes,3,rep,name=filters" json:"filters,omitempty"` 961} 962 963func (m *WatchRequest_WatchEntry) Reset() { *m = WatchRequest_WatchEntry{} } 964func (*WatchRequest_WatchEntry) ProtoMessage() {} 965func (*WatchRequest_WatchEntry) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{4, 0} } 966 967// WatchMessage is the type of the stream that's returned to the client by 968// Watch. Note that the first item of this stream will always be a WatchMessage 969// with a nil Object, to signal that the stream has started. 970type WatchMessage struct { 971 Events []*WatchMessage_Event `protobuf:"bytes,1,rep,name=events" json:"events,omitempty"` 972 // Index versions this change to the data store. It can be used to 973 // resume the watch from this point. 974 Version *Version `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` 975} 976 977func (m *WatchMessage) Reset() { *m = WatchMessage{} } 978func (*WatchMessage) ProtoMessage() {} 979func (*WatchMessage) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{5} } 980 981type WatchMessage_Event struct { 982 // Action (create/update/delete) 983 // Note that WatchMessage does not expose "commit" events that 984 // mark transaction boundaries. 985 Action WatchActionKind `protobuf:"varint,1,opt,name=action,proto3,enum=docker.swarmkit.v1.WatchActionKind" json:"action,omitempty"` 986 // Matched object 987 Object *Object `protobuf:"bytes,2,opt,name=object" json:"object,omitempty"` 988 // For updates, OldObject will optionally be included in the 989 // watch message, containing the previous version of the 990 // object, if IncludeOldObject was set in WatchRequest. 991 OldObject *Object `protobuf:"bytes,3,opt,name=old_object,json=oldObject" json:"old_object,omitempty"` 992} 993 994func (m *WatchMessage_Event) Reset() { *m = WatchMessage_Event{} } 995func (*WatchMessage_Event) ProtoMessage() {} 996func (*WatchMessage_Event) Descriptor() ([]byte, []int) { return fileDescriptorWatch, []int{5, 0} } 997 998func init() { 999 proto.RegisterType((*Object)(nil), "docker.swarmkit.v1.Object") 1000 proto.RegisterType((*SelectBySlot)(nil), "docker.swarmkit.v1.SelectBySlot") 1001 proto.RegisterType((*SelectByCustom)(nil), "docker.swarmkit.v1.SelectByCustom") 1002 proto.RegisterType((*SelectBy)(nil), "docker.swarmkit.v1.SelectBy") 1003 proto.RegisterType((*WatchRequest)(nil), "docker.swarmkit.v1.WatchRequest") 1004 proto.RegisterType((*WatchRequest_WatchEntry)(nil), "docker.swarmkit.v1.WatchRequest.WatchEntry") 1005 proto.RegisterType((*WatchMessage)(nil), "docker.swarmkit.v1.WatchMessage") 1006 proto.RegisterType((*WatchMessage_Event)(nil), "docker.swarmkit.v1.WatchMessage.Event") 1007 proto.RegisterEnum("docker.swarmkit.v1.WatchActionKind", WatchActionKind_name, WatchActionKind_value) 1008} 1009 1010type authenticatedWrapperWatchServer struct { 1011 local WatchServer 1012 authorize func(context.Context, []string) error 1013} 1014 1015func NewAuthenticatedWrapperWatchServer(local WatchServer, authorize func(context.Context, []string) error) WatchServer { 1016 return &authenticatedWrapperWatchServer{ 1017 local: local, 1018 authorize: authorize, 1019 } 1020} 1021 1022func (p *authenticatedWrapperWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error { 1023 1024 if err := p.authorize(stream.Context(), []string{"swarm-manager"}); err != nil { 1025 return err 1026 } 1027 return p.local.Watch(r, stream) 1028} 1029 1030func (m *Object) Copy() *Object { 1031 if m == nil { 1032 return nil 1033 } 1034 o := &Object{} 1035 o.CopyFrom(m) 1036 return o 1037} 1038 1039func (m *Object) CopyFrom(src interface{}) { 1040 1041 o := src.(*Object) 1042 *m = *o 1043 if o.Object != nil { 1044 switch o.Object.(type) { 1045 case *Object_Node: 1046 v := Object_Node{ 1047 Node: &Node{}, 1048 } 1049 deepcopy.Copy(v.Node, o.GetNode()) 1050 m.Object = &v 1051 case *Object_Service: 1052 v := Object_Service{ 1053 Service: &Service{}, 1054 } 1055 deepcopy.Copy(v.Service, o.GetService()) 1056 m.Object = &v 1057 case *Object_Network: 1058 v := Object_Network{ 1059 Network: &Network{}, 1060 } 1061 deepcopy.Copy(v.Network, o.GetNetwork()) 1062 m.Object = &v 1063 case *Object_Task: 1064 v := Object_Task{ 1065 Task: &Task{}, 1066 } 1067 deepcopy.Copy(v.Task, o.GetTask()) 1068 m.Object = &v 1069 case *Object_Cluster: 1070 v := Object_Cluster{ 1071 Cluster: &Cluster{}, 1072 } 1073 deepcopy.Copy(v.Cluster, o.GetCluster()) 1074 m.Object = &v 1075 case *Object_Secret: 1076 v := Object_Secret{ 1077 Secret: &Secret{}, 1078 } 1079 deepcopy.Copy(v.Secret, o.GetSecret()) 1080 m.Object = &v 1081 case *Object_Resource: 1082 v := Object_Resource{ 1083 Resource: &Resource{}, 1084 } 1085 deepcopy.Copy(v.Resource, o.GetResource()) 1086 m.Object = &v 1087 case *Object_Extension: 1088 v := Object_Extension{ 1089 Extension: &Extension{}, 1090 } 1091 deepcopy.Copy(v.Extension, o.GetExtension()) 1092 m.Object = &v 1093 case *Object_Config: 1094 v := Object_Config{ 1095 Config: &Config{}, 1096 } 1097 deepcopy.Copy(v.Config, o.GetConfig()) 1098 m.Object = &v 1099 } 1100 } 1101 1102} 1103 1104func (m *SelectBySlot) Copy() *SelectBySlot { 1105 if m == nil { 1106 return nil 1107 } 1108 o := &SelectBySlot{} 1109 o.CopyFrom(m) 1110 return o 1111} 1112 1113func (m *SelectBySlot) CopyFrom(src interface{}) { 1114 1115 o := src.(*SelectBySlot) 1116 *m = *o 1117} 1118 1119func (m *SelectByCustom) Copy() *SelectByCustom { 1120 if m == nil { 1121 return nil 1122 } 1123 o := &SelectByCustom{} 1124 o.CopyFrom(m) 1125 return o 1126} 1127 1128func (m *SelectByCustom) CopyFrom(src interface{}) { 1129 1130 o := src.(*SelectByCustom) 1131 *m = *o 1132} 1133 1134func (m *SelectBy) Copy() *SelectBy { 1135 if m == nil { 1136 return nil 1137 } 1138 o := &SelectBy{} 1139 o.CopyFrom(m) 1140 return o 1141} 1142 1143func (m *SelectBy) CopyFrom(src interface{}) { 1144 1145 o := src.(*SelectBy) 1146 *m = *o 1147 if o.By != nil { 1148 switch o.By.(type) { 1149 case *SelectBy_ID: 1150 v := SelectBy_ID{ 1151 ID: o.GetID(), 1152 } 1153 m.By = &v 1154 case *SelectBy_IDPrefix: 1155 v := SelectBy_IDPrefix{ 1156 IDPrefix: o.GetIDPrefix(), 1157 } 1158 m.By = &v 1159 case *SelectBy_Name: 1160 v := SelectBy_Name{ 1161 Name: o.GetName(), 1162 } 1163 m.By = &v 1164 case *SelectBy_NamePrefix: 1165 v := SelectBy_NamePrefix{ 1166 NamePrefix: o.GetNamePrefix(), 1167 } 1168 m.By = &v 1169 case *SelectBy_Custom: 1170 v := SelectBy_Custom{ 1171 Custom: &SelectByCustom{}, 1172 } 1173 deepcopy.Copy(v.Custom, o.GetCustom()) 1174 m.By = &v 1175 case *SelectBy_CustomPrefix: 1176 v := SelectBy_CustomPrefix{ 1177 CustomPrefix: &SelectByCustom{}, 1178 } 1179 deepcopy.Copy(v.CustomPrefix, o.GetCustomPrefix()) 1180 m.By = &v 1181 case *SelectBy_ServiceID: 1182 v := SelectBy_ServiceID{ 1183 ServiceID: o.GetServiceID(), 1184 } 1185 m.By = &v 1186 case *SelectBy_NodeID: 1187 v := SelectBy_NodeID{ 1188 NodeID: o.GetNodeID(), 1189 } 1190 m.By = &v 1191 case *SelectBy_Slot: 1192 v := SelectBy_Slot{ 1193 Slot: &SelectBySlot{}, 1194 } 1195 deepcopy.Copy(v.Slot, o.GetSlot()) 1196 m.By = &v 1197 case *SelectBy_DesiredState: 1198 v := SelectBy_DesiredState{ 1199 DesiredState: o.GetDesiredState(), 1200 } 1201 m.By = &v 1202 case *SelectBy_Role: 1203 v := SelectBy_Role{ 1204 Role: o.GetRole(), 1205 } 1206 m.By = &v 1207 case *SelectBy_Membership: 1208 v := SelectBy_Membership{ 1209 Membership: o.GetMembership(), 1210 } 1211 m.By = &v 1212 case *SelectBy_ReferencedNetworkID: 1213 v := SelectBy_ReferencedNetworkID{ 1214 ReferencedNetworkID: o.GetReferencedNetworkID(), 1215 } 1216 m.By = &v 1217 case *SelectBy_ReferencedSecretID: 1218 v := SelectBy_ReferencedSecretID{ 1219 ReferencedSecretID: o.GetReferencedSecretID(), 1220 } 1221 m.By = &v 1222 case *SelectBy_ReferencedConfigID: 1223 v := SelectBy_ReferencedConfigID{ 1224 ReferencedConfigID: o.GetReferencedConfigID(), 1225 } 1226 m.By = &v 1227 case *SelectBy_Kind: 1228 v := SelectBy_Kind{ 1229 Kind: o.GetKind(), 1230 } 1231 m.By = &v 1232 } 1233 } 1234 1235} 1236 1237func (m *WatchRequest) Copy() *WatchRequest { 1238 if m == nil { 1239 return nil 1240 } 1241 o := &WatchRequest{} 1242 o.CopyFrom(m) 1243 return o 1244} 1245 1246func (m *WatchRequest) CopyFrom(src interface{}) { 1247 1248 o := src.(*WatchRequest) 1249 *m = *o 1250 if o.Entries != nil { 1251 m.Entries = make([]*WatchRequest_WatchEntry, len(o.Entries)) 1252 for i := range m.Entries { 1253 m.Entries[i] = &WatchRequest_WatchEntry{} 1254 deepcopy.Copy(m.Entries[i], o.Entries[i]) 1255 } 1256 } 1257 1258 if o.ResumeFrom != nil { 1259 m.ResumeFrom = &Version{} 1260 deepcopy.Copy(m.ResumeFrom, o.ResumeFrom) 1261 } 1262} 1263 1264func (m *WatchRequest_WatchEntry) Copy() *WatchRequest_WatchEntry { 1265 if m == nil { 1266 return nil 1267 } 1268 o := &WatchRequest_WatchEntry{} 1269 o.CopyFrom(m) 1270 return o 1271} 1272 1273func (m *WatchRequest_WatchEntry) CopyFrom(src interface{}) { 1274 1275 o := src.(*WatchRequest_WatchEntry) 1276 *m = *o 1277 if o.Filters != nil { 1278 m.Filters = make([]*SelectBy, len(o.Filters)) 1279 for i := range m.Filters { 1280 m.Filters[i] = &SelectBy{} 1281 deepcopy.Copy(m.Filters[i], o.Filters[i]) 1282 } 1283 } 1284 1285} 1286 1287func (m *WatchMessage) Copy() *WatchMessage { 1288 if m == nil { 1289 return nil 1290 } 1291 o := &WatchMessage{} 1292 o.CopyFrom(m) 1293 return o 1294} 1295 1296func (m *WatchMessage) CopyFrom(src interface{}) { 1297 1298 o := src.(*WatchMessage) 1299 *m = *o 1300 if o.Events != nil { 1301 m.Events = make([]*WatchMessage_Event, len(o.Events)) 1302 for i := range m.Events { 1303 m.Events[i] = &WatchMessage_Event{} 1304 deepcopy.Copy(m.Events[i], o.Events[i]) 1305 } 1306 } 1307 1308 if o.Version != nil { 1309 m.Version = &Version{} 1310 deepcopy.Copy(m.Version, o.Version) 1311 } 1312} 1313 1314func (m *WatchMessage_Event) Copy() *WatchMessage_Event { 1315 if m == nil { 1316 return nil 1317 } 1318 o := &WatchMessage_Event{} 1319 o.CopyFrom(m) 1320 return o 1321} 1322 1323func (m *WatchMessage_Event) CopyFrom(src interface{}) { 1324 1325 o := src.(*WatchMessage_Event) 1326 *m = *o 1327 if o.Object != nil { 1328 m.Object = &Object{} 1329 deepcopy.Copy(m.Object, o.Object) 1330 } 1331 if o.OldObject != nil { 1332 m.OldObject = &Object{} 1333 deepcopy.Copy(m.OldObject, o.OldObject) 1334 } 1335} 1336 1337// Reference imports to suppress errors if they are not otherwise used. 1338var _ context.Context 1339var _ grpc.ClientConn 1340 1341// This is a compile-time assertion to ensure that this generated file 1342// is compatible with the grpc package it is being compiled against. 1343const _ = grpc.SupportPackageIsVersion4 1344 1345// Client API for Watch service 1346 1347type WatchClient interface { 1348 // Watch starts a stream that returns any changes to objects that match 1349 // the specified selectors. When the stream begins, it immediately sends 1350 // an empty message back to the client. It is important to wait for 1351 // this message before taking any actions that depend on an established 1352 // stream of changes for consistency. 1353 Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error) 1354} 1355 1356type watchClient struct { 1357 cc *grpc.ClientConn 1358} 1359 1360func NewWatchClient(cc *grpc.ClientConn) WatchClient { 1361 return &watchClient{cc} 1362} 1363 1364func (c *watchClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error) { 1365 stream, err := grpc.NewClientStream(ctx, &_Watch_serviceDesc.Streams[0], c.cc, "/docker.swarmkit.v1.Watch/Watch", opts...) 1366 if err != nil { 1367 return nil, err 1368 } 1369 x := &watchWatchClient{stream} 1370 if err := x.ClientStream.SendMsg(in); err != nil { 1371 return nil, err 1372 } 1373 if err := x.ClientStream.CloseSend(); err != nil { 1374 return nil, err 1375 } 1376 return x, nil 1377} 1378 1379type Watch_WatchClient interface { 1380 Recv() (*WatchMessage, error) 1381 grpc.ClientStream 1382} 1383 1384type watchWatchClient struct { 1385 grpc.ClientStream 1386} 1387 1388func (x *watchWatchClient) Recv() (*WatchMessage, error) { 1389 m := new(WatchMessage) 1390 if err := x.ClientStream.RecvMsg(m); err != nil { 1391 return nil, err 1392 } 1393 return m, nil 1394} 1395 1396// Server API for Watch service 1397 1398type WatchServer interface { 1399 // Watch starts a stream that returns any changes to objects that match 1400 // the specified selectors. When the stream begins, it immediately sends 1401 // an empty message back to the client. It is important to wait for 1402 // this message before taking any actions that depend on an established 1403 // stream of changes for consistency. 1404 Watch(*WatchRequest, Watch_WatchServer) error 1405} 1406 1407func RegisterWatchServer(s *grpc.Server, srv WatchServer) { 1408 s.RegisterService(&_Watch_serviceDesc, srv) 1409} 1410 1411func _Watch_Watch_Handler(srv interface{}, stream grpc.ServerStream) error { 1412 m := new(WatchRequest) 1413 if err := stream.RecvMsg(m); err != nil { 1414 return err 1415 } 1416 return srv.(WatchServer).Watch(m, &watchWatchServer{stream}) 1417} 1418 1419type Watch_WatchServer interface { 1420 Send(*WatchMessage) error 1421 grpc.ServerStream 1422} 1423 1424type watchWatchServer struct { 1425 grpc.ServerStream 1426} 1427 1428func (x *watchWatchServer) Send(m *WatchMessage) error { 1429 return x.ServerStream.SendMsg(m) 1430} 1431 1432var _Watch_serviceDesc = grpc.ServiceDesc{ 1433 ServiceName: "docker.swarmkit.v1.Watch", 1434 HandlerType: (*WatchServer)(nil), 1435 Methods: []grpc.MethodDesc{}, 1436 Streams: []grpc.StreamDesc{ 1437 { 1438 StreamName: "Watch", 1439 Handler: _Watch_Watch_Handler, 1440 ServerStreams: true, 1441 }, 1442 }, 1443 Metadata: "github.com/docker/swarmkit/api/watch.proto", 1444} 1445 1446func (m *Object) Marshal() (dAtA []byte, err error) { 1447 size := m.Size() 1448 dAtA = make([]byte, size) 1449 n, err := m.MarshalTo(dAtA) 1450 if err != nil { 1451 return nil, err 1452 } 1453 return dAtA[:n], nil 1454} 1455 1456func (m *Object) MarshalTo(dAtA []byte) (int, error) { 1457 var i int 1458 _ = i 1459 var l int 1460 _ = l 1461 if m.Object != nil { 1462 nn1, err := m.Object.MarshalTo(dAtA[i:]) 1463 if err != nil { 1464 return 0, err 1465 } 1466 i += nn1 1467 } 1468 return i, nil 1469} 1470 1471func (m *Object_Node) MarshalTo(dAtA []byte) (int, error) { 1472 i := 0 1473 if m.Node != nil { 1474 dAtA[i] = 0xa 1475 i++ 1476 i = encodeVarintWatch(dAtA, i, uint64(m.Node.Size())) 1477 n2, err := m.Node.MarshalTo(dAtA[i:]) 1478 if err != nil { 1479 return 0, err 1480 } 1481 i += n2 1482 } 1483 return i, nil 1484} 1485func (m *Object_Service) MarshalTo(dAtA []byte) (int, error) { 1486 i := 0 1487 if m.Service != nil { 1488 dAtA[i] = 0x12 1489 i++ 1490 i = encodeVarintWatch(dAtA, i, uint64(m.Service.Size())) 1491 n3, err := m.Service.MarshalTo(dAtA[i:]) 1492 if err != nil { 1493 return 0, err 1494 } 1495 i += n3 1496 } 1497 return i, nil 1498} 1499func (m *Object_Network) MarshalTo(dAtA []byte) (int, error) { 1500 i := 0 1501 if m.Network != nil { 1502 dAtA[i] = 0x1a 1503 i++ 1504 i = encodeVarintWatch(dAtA, i, uint64(m.Network.Size())) 1505 n4, err := m.Network.MarshalTo(dAtA[i:]) 1506 if err != nil { 1507 return 0, err 1508 } 1509 i += n4 1510 } 1511 return i, nil 1512} 1513func (m *Object_Task) MarshalTo(dAtA []byte) (int, error) { 1514 i := 0 1515 if m.Task != nil { 1516 dAtA[i] = 0x22 1517 i++ 1518 i = encodeVarintWatch(dAtA, i, uint64(m.Task.Size())) 1519 n5, err := m.Task.MarshalTo(dAtA[i:]) 1520 if err != nil { 1521 return 0, err 1522 } 1523 i += n5 1524 } 1525 return i, nil 1526} 1527func (m *Object_Cluster) MarshalTo(dAtA []byte) (int, error) { 1528 i := 0 1529 if m.Cluster != nil { 1530 dAtA[i] = 0x2a 1531 i++ 1532 i = encodeVarintWatch(dAtA, i, uint64(m.Cluster.Size())) 1533 n6, err := m.Cluster.MarshalTo(dAtA[i:]) 1534 if err != nil { 1535 return 0, err 1536 } 1537 i += n6 1538 } 1539 return i, nil 1540} 1541func (m *Object_Secret) MarshalTo(dAtA []byte) (int, error) { 1542 i := 0 1543 if m.Secret != nil { 1544 dAtA[i] = 0x32 1545 i++ 1546 i = encodeVarintWatch(dAtA, i, uint64(m.Secret.Size())) 1547 n7, err := m.Secret.MarshalTo(dAtA[i:]) 1548 if err != nil { 1549 return 0, err 1550 } 1551 i += n7 1552 } 1553 return i, nil 1554} 1555func (m *Object_Resource) MarshalTo(dAtA []byte) (int, error) { 1556 i := 0 1557 if m.Resource != nil { 1558 dAtA[i] = 0x3a 1559 i++ 1560 i = encodeVarintWatch(dAtA, i, uint64(m.Resource.Size())) 1561 n8, err := m.Resource.MarshalTo(dAtA[i:]) 1562 if err != nil { 1563 return 0, err 1564 } 1565 i += n8 1566 } 1567 return i, nil 1568} 1569func (m *Object_Extension) MarshalTo(dAtA []byte) (int, error) { 1570 i := 0 1571 if m.Extension != nil { 1572 dAtA[i] = 0x42 1573 i++ 1574 i = encodeVarintWatch(dAtA, i, uint64(m.Extension.Size())) 1575 n9, err := m.Extension.MarshalTo(dAtA[i:]) 1576 if err != nil { 1577 return 0, err 1578 } 1579 i += n9 1580 } 1581 return i, nil 1582} 1583func (m *Object_Config) MarshalTo(dAtA []byte) (int, error) { 1584 i := 0 1585 if m.Config != nil { 1586 dAtA[i] = 0x4a 1587 i++ 1588 i = encodeVarintWatch(dAtA, i, uint64(m.Config.Size())) 1589 n10, err := m.Config.MarshalTo(dAtA[i:]) 1590 if err != nil { 1591 return 0, err 1592 } 1593 i += n10 1594 } 1595 return i, nil 1596} 1597func (m *SelectBySlot) Marshal() (dAtA []byte, err error) { 1598 size := m.Size() 1599 dAtA = make([]byte, size) 1600 n, err := m.MarshalTo(dAtA) 1601 if err != nil { 1602 return nil, err 1603 } 1604 return dAtA[:n], nil 1605} 1606 1607func (m *SelectBySlot) MarshalTo(dAtA []byte) (int, error) { 1608 var i int 1609 _ = i 1610 var l int 1611 _ = l 1612 if len(m.ServiceID) > 0 { 1613 dAtA[i] = 0xa 1614 i++ 1615 i = encodeVarintWatch(dAtA, i, uint64(len(m.ServiceID))) 1616 i += copy(dAtA[i:], m.ServiceID) 1617 } 1618 if m.Slot != 0 { 1619 dAtA[i] = 0x10 1620 i++ 1621 i = encodeVarintWatch(dAtA, i, uint64(m.Slot)) 1622 } 1623 return i, nil 1624} 1625 1626func (m *SelectByCustom) Marshal() (dAtA []byte, err error) { 1627 size := m.Size() 1628 dAtA = make([]byte, size) 1629 n, err := m.MarshalTo(dAtA) 1630 if err != nil { 1631 return nil, err 1632 } 1633 return dAtA[:n], nil 1634} 1635 1636func (m *SelectByCustom) MarshalTo(dAtA []byte) (int, error) { 1637 var i int 1638 _ = i 1639 var l int 1640 _ = l 1641 if len(m.Kind) > 0 { 1642 dAtA[i] = 0xa 1643 i++ 1644 i = encodeVarintWatch(dAtA, i, uint64(len(m.Kind))) 1645 i += copy(dAtA[i:], m.Kind) 1646 } 1647 if len(m.Index) > 0 { 1648 dAtA[i] = 0x12 1649 i++ 1650 i = encodeVarintWatch(dAtA, i, uint64(len(m.Index))) 1651 i += copy(dAtA[i:], m.Index) 1652 } 1653 if len(m.Value) > 0 { 1654 dAtA[i] = 0x1a 1655 i++ 1656 i = encodeVarintWatch(dAtA, i, uint64(len(m.Value))) 1657 i += copy(dAtA[i:], m.Value) 1658 } 1659 return i, nil 1660} 1661 1662func (m *SelectBy) Marshal() (dAtA []byte, err error) { 1663 size := m.Size() 1664 dAtA = make([]byte, size) 1665 n, err := m.MarshalTo(dAtA) 1666 if err != nil { 1667 return nil, err 1668 } 1669 return dAtA[:n], nil 1670} 1671 1672func (m *SelectBy) MarshalTo(dAtA []byte) (int, error) { 1673 var i int 1674 _ = i 1675 var l int 1676 _ = l 1677 if m.By != nil { 1678 nn11, err := m.By.MarshalTo(dAtA[i:]) 1679 if err != nil { 1680 return 0, err 1681 } 1682 i += nn11 1683 } 1684 return i, nil 1685} 1686 1687func (m *SelectBy_ID) MarshalTo(dAtA []byte) (int, error) { 1688 i := 0 1689 dAtA[i] = 0xa 1690 i++ 1691 i = encodeVarintWatch(dAtA, i, uint64(len(m.ID))) 1692 i += copy(dAtA[i:], m.ID) 1693 return i, nil 1694} 1695func (m *SelectBy_IDPrefix) MarshalTo(dAtA []byte) (int, error) { 1696 i := 0 1697 dAtA[i] = 0x12 1698 i++ 1699 i = encodeVarintWatch(dAtA, i, uint64(len(m.IDPrefix))) 1700 i += copy(dAtA[i:], m.IDPrefix) 1701 return i, nil 1702} 1703func (m *SelectBy_Name) MarshalTo(dAtA []byte) (int, error) { 1704 i := 0 1705 dAtA[i] = 0x1a 1706 i++ 1707 i = encodeVarintWatch(dAtA, i, uint64(len(m.Name))) 1708 i += copy(dAtA[i:], m.Name) 1709 return i, nil 1710} 1711func (m *SelectBy_NamePrefix) MarshalTo(dAtA []byte) (int, error) { 1712 i := 0 1713 dAtA[i] = 0x22 1714 i++ 1715 i = encodeVarintWatch(dAtA, i, uint64(len(m.NamePrefix))) 1716 i += copy(dAtA[i:], m.NamePrefix) 1717 return i, nil 1718} 1719func (m *SelectBy_Custom) MarshalTo(dAtA []byte) (int, error) { 1720 i := 0 1721 if m.Custom != nil { 1722 dAtA[i] = 0x2a 1723 i++ 1724 i = encodeVarintWatch(dAtA, i, uint64(m.Custom.Size())) 1725 n12, err := m.Custom.MarshalTo(dAtA[i:]) 1726 if err != nil { 1727 return 0, err 1728 } 1729 i += n12 1730 } 1731 return i, nil 1732} 1733func (m *SelectBy_CustomPrefix) MarshalTo(dAtA []byte) (int, error) { 1734 i := 0 1735 if m.CustomPrefix != nil { 1736 dAtA[i] = 0x32 1737 i++ 1738 i = encodeVarintWatch(dAtA, i, uint64(m.CustomPrefix.Size())) 1739 n13, err := m.CustomPrefix.MarshalTo(dAtA[i:]) 1740 if err != nil { 1741 return 0, err 1742 } 1743 i += n13 1744 } 1745 return i, nil 1746} 1747func (m *SelectBy_ServiceID) MarshalTo(dAtA []byte) (int, error) { 1748 i := 0 1749 dAtA[i] = 0x3a 1750 i++ 1751 i = encodeVarintWatch(dAtA, i, uint64(len(m.ServiceID))) 1752 i += copy(dAtA[i:], m.ServiceID) 1753 return i, nil 1754} 1755func (m *SelectBy_NodeID) MarshalTo(dAtA []byte) (int, error) { 1756 i := 0 1757 dAtA[i] = 0x42 1758 i++ 1759 i = encodeVarintWatch(dAtA, i, uint64(len(m.NodeID))) 1760 i += copy(dAtA[i:], m.NodeID) 1761 return i, nil 1762} 1763func (m *SelectBy_Slot) MarshalTo(dAtA []byte) (int, error) { 1764 i := 0 1765 if m.Slot != nil { 1766 dAtA[i] = 0x4a 1767 i++ 1768 i = encodeVarintWatch(dAtA, i, uint64(m.Slot.Size())) 1769 n14, err := m.Slot.MarshalTo(dAtA[i:]) 1770 if err != nil { 1771 return 0, err 1772 } 1773 i += n14 1774 } 1775 return i, nil 1776} 1777func (m *SelectBy_DesiredState) MarshalTo(dAtA []byte) (int, error) { 1778 i := 0 1779 dAtA[i] = 0x50 1780 i++ 1781 i = encodeVarintWatch(dAtA, i, uint64(m.DesiredState)) 1782 return i, nil 1783} 1784func (m *SelectBy_Role) MarshalTo(dAtA []byte) (int, error) { 1785 i := 0 1786 dAtA[i] = 0x58 1787 i++ 1788 i = encodeVarintWatch(dAtA, i, uint64(m.Role)) 1789 return i, nil 1790} 1791func (m *SelectBy_Membership) MarshalTo(dAtA []byte) (int, error) { 1792 i := 0 1793 dAtA[i] = 0x60 1794 i++ 1795 i = encodeVarintWatch(dAtA, i, uint64(m.Membership)) 1796 return i, nil 1797} 1798func (m *SelectBy_ReferencedNetworkID) MarshalTo(dAtA []byte) (int, error) { 1799 i := 0 1800 dAtA[i] = 0x6a 1801 i++ 1802 i = encodeVarintWatch(dAtA, i, uint64(len(m.ReferencedNetworkID))) 1803 i += copy(dAtA[i:], m.ReferencedNetworkID) 1804 return i, nil 1805} 1806func (m *SelectBy_ReferencedSecretID) MarshalTo(dAtA []byte) (int, error) { 1807 i := 0 1808 dAtA[i] = 0x72 1809 i++ 1810 i = encodeVarintWatch(dAtA, i, uint64(len(m.ReferencedSecretID))) 1811 i += copy(dAtA[i:], m.ReferencedSecretID) 1812 return i, nil 1813} 1814func (m *SelectBy_Kind) MarshalTo(dAtA []byte) (int, error) { 1815 i := 0 1816 dAtA[i] = 0x7a 1817 i++ 1818 i = encodeVarintWatch(dAtA, i, uint64(len(m.Kind))) 1819 i += copy(dAtA[i:], m.Kind) 1820 return i, nil 1821} 1822func (m *SelectBy_ReferencedConfigID) MarshalTo(dAtA []byte) (int, error) { 1823 i := 0 1824 dAtA[i] = 0x82 1825 i++ 1826 dAtA[i] = 0x1 1827 i++ 1828 i = encodeVarintWatch(dAtA, i, uint64(len(m.ReferencedConfigID))) 1829 i += copy(dAtA[i:], m.ReferencedConfigID) 1830 return i, nil 1831} 1832func (m *WatchRequest) Marshal() (dAtA []byte, err error) { 1833 size := m.Size() 1834 dAtA = make([]byte, size) 1835 n, err := m.MarshalTo(dAtA) 1836 if err != nil { 1837 return nil, err 1838 } 1839 return dAtA[:n], nil 1840} 1841 1842func (m *WatchRequest) MarshalTo(dAtA []byte) (int, error) { 1843 var i int 1844 _ = i 1845 var l int 1846 _ = l 1847 if len(m.Entries) > 0 { 1848 for _, msg := range m.Entries { 1849 dAtA[i] = 0xa 1850 i++ 1851 i = encodeVarintWatch(dAtA, i, uint64(msg.Size())) 1852 n, err := msg.MarshalTo(dAtA[i:]) 1853 if err != nil { 1854 return 0, err 1855 } 1856 i += n 1857 } 1858 } 1859 if m.ResumeFrom != nil { 1860 dAtA[i] = 0x12 1861 i++ 1862 i = encodeVarintWatch(dAtA, i, uint64(m.ResumeFrom.Size())) 1863 n15, err := m.ResumeFrom.MarshalTo(dAtA[i:]) 1864 if err != nil { 1865 return 0, err 1866 } 1867 i += n15 1868 } 1869 if m.IncludeOldObject { 1870 dAtA[i] = 0x18 1871 i++ 1872 if m.IncludeOldObject { 1873 dAtA[i] = 1 1874 } else { 1875 dAtA[i] = 0 1876 } 1877 i++ 1878 } 1879 return i, nil 1880} 1881 1882func (m *WatchRequest_WatchEntry) Marshal() (dAtA []byte, err error) { 1883 size := m.Size() 1884 dAtA = make([]byte, size) 1885 n, err := m.MarshalTo(dAtA) 1886 if err != nil { 1887 return nil, err 1888 } 1889 return dAtA[:n], nil 1890} 1891 1892func (m *WatchRequest_WatchEntry) MarshalTo(dAtA []byte) (int, error) { 1893 var i int 1894 _ = i 1895 var l int 1896 _ = l 1897 if len(m.Kind) > 0 { 1898 dAtA[i] = 0xa 1899 i++ 1900 i = encodeVarintWatch(dAtA, i, uint64(len(m.Kind))) 1901 i += copy(dAtA[i:], m.Kind) 1902 } 1903 if m.Action != 0 { 1904 dAtA[i] = 0x10 1905 i++ 1906 i = encodeVarintWatch(dAtA, i, uint64(m.Action)) 1907 } 1908 if len(m.Filters) > 0 { 1909 for _, msg := range m.Filters { 1910 dAtA[i] = 0x1a 1911 i++ 1912 i = encodeVarintWatch(dAtA, i, uint64(msg.Size())) 1913 n, err := msg.MarshalTo(dAtA[i:]) 1914 if err != nil { 1915 return 0, err 1916 } 1917 i += n 1918 } 1919 } 1920 return i, nil 1921} 1922 1923func (m *WatchMessage) Marshal() (dAtA []byte, err error) { 1924 size := m.Size() 1925 dAtA = make([]byte, size) 1926 n, err := m.MarshalTo(dAtA) 1927 if err != nil { 1928 return nil, err 1929 } 1930 return dAtA[:n], nil 1931} 1932 1933func (m *WatchMessage) MarshalTo(dAtA []byte) (int, error) { 1934 var i int 1935 _ = i 1936 var l int 1937 _ = l 1938 if len(m.Events) > 0 { 1939 for _, msg := range m.Events { 1940 dAtA[i] = 0xa 1941 i++ 1942 i = encodeVarintWatch(dAtA, i, uint64(msg.Size())) 1943 n, err := msg.MarshalTo(dAtA[i:]) 1944 if err != nil { 1945 return 0, err 1946 } 1947 i += n 1948 } 1949 } 1950 if m.Version != nil { 1951 dAtA[i] = 0x12 1952 i++ 1953 i = encodeVarintWatch(dAtA, i, uint64(m.Version.Size())) 1954 n16, err := m.Version.MarshalTo(dAtA[i:]) 1955 if err != nil { 1956 return 0, err 1957 } 1958 i += n16 1959 } 1960 return i, nil 1961} 1962 1963func (m *WatchMessage_Event) Marshal() (dAtA []byte, err error) { 1964 size := m.Size() 1965 dAtA = make([]byte, size) 1966 n, err := m.MarshalTo(dAtA) 1967 if err != nil { 1968 return nil, err 1969 } 1970 return dAtA[:n], nil 1971} 1972 1973func (m *WatchMessage_Event) MarshalTo(dAtA []byte) (int, error) { 1974 var i int 1975 _ = i 1976 var l int 1977 _ = l 1978 if m.Action != 0 { 1979 dAtA[i] = 0x8 1980 i++ 1981 i = encodeVarintWatch(dAtA, i, uint64(m.Action)) 1982 } 1983 if m.Object != nil { 1984 dAtA[i] = 0x12 1985 i++ 1986 i = encodeVarintWatch(dAtA, i, uint64(m.Object.Size())) 1987 n17, err := m.Object.MarshalTo(dAtA[i:]) 1988 if err != nil { 1989 return 0, err 1990 } 1991 i += n17 1992 } 1993 if m.OldObject != nil { 1994 dAtA[i] = 0x1a 1995 i++ 1996 i = encodeVarintWatch(dAtA, i, uint64(m.OldObject.Size())) 1997 n18, err := m.OldObject.MarshalTo(dAtA[i:]) 1998 if err != nil { 1999 return 0, err 2000 } 2001 i += n18 2002 } 2003 return i, nil 2004} 2005 2006func encodeVarintWatch(dAtA []byte, offset int, v uint64) int { 2007 for v >= 1<<7 { 2008 dAtA[offset] = uint8(v&0x7f | 0x80) 2009 v >>= 7 2010 offset++ 2011 } 2012 dAtA[offset] = uint8(v) 2013 return offset + 1 2014} 2015 2016type raftProxyWatchServer struct { 2017 local WatchServer 2018 connSelector raftselector.ConnProvider 2019 localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error) 2020} 2021 2022func NewRaftProxyWatchServer(local WatchServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) WatchServer { 2023 redirectChecker := func(ctx context.Context) (context.Context, error) { 2024 p, ok := peer.FromContext(ctx) 2025 if !ok { 2026 return ctx, status.Errorf(codes.InvalidArgument, "remote addr is not found in context") 2027 } 2028 addr := p.Addr.String() 2029 md, ok := metadata.FromIncomingContext(ctx) 2030 if ok && len(md["redirect"]) != 0 { 2031 return ctx, status.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"]) 2032 } 2033 if !ok { 2034 md = metadata.New(map[string]string{}) 2035 } 2036 md["redirect"] = append(md["redirect"], addr) 2037 return metadata.NewOutgoingContext(ctx, md), nil 2038 } 2039 remoteMods := []func(context.Context) (context.Context, error){redirectChecker} 2040 remoteMods = append(remoteMods, remoteCtxMod) 2041 2042 var localMods []func(context.Context) (context.Context, error) 2043 if localCtxMod != nil { 2044 localMods = []func(context.Context) (context.Context, error){localCtxMod} 2045 } 2046 2047 return &raftProxyWatchServer{ 2048 local: local, 2049 connSelector: connSelector, 2050 localCtxMods: localMods, 2051 remoteCtxMods: remoteMods, 2052 } 2053} 2054func (p *raftProxyWatchServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) { 2055 var err error 2056 for _, mod := range ctxMods { 2057 ctx, err = mod(ctx) 2058 if err != nil { 2059 return ctx, err 2060 } 2061 } 2062 return ctx, nil 2063} 2064func (p *raftProxyWatchServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) { 2065 ticker := rafttime.NewTicker(500 * rafttime.Millisecond) 2066 defer ticker.Stop() 2067 for { 2068 select { 2069 case <-ticker.C: 2070 conn, err := p.connSelector.LeaderConn(ctx) 2071 if err != nil { 2072 return nil, err 2073 } 2074 2075 client := NewHealthClient(conn) 2076 2077 resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"}) 2078 if err != nil || resp.Status != HealthCheckResponse_SERVING { 2079 continue 2080 } 2081 return conn, nil 2082 case <-ctx.Done(): 2083 return nil, ctx.Err() 2084 } 2085 } 2086} 2087 2088type Watch_WatchServerWrapper struct { 2089 Watch_WatchServer 2090 ctx context.Context 2091} 2092 2093func (s Watch_WatchServerWrapper) Context() context.Context { 2094 return s.ctx 2095} 2096 2097func (p *raftProxyWatchServer) Watch(r *WatchRequest, stream Watch_WatchServer) error { 2098 ctx := stream.Context() 2099 conn, err := p.connSelector.LeaderConn(ctx) 2100 if err != nil { 2101 if err == raftselector.ErrIsLeader { 2102 ctx, err = p.runCtxMods(ctx, p.localCtxMods) 2103 if err != nil { 2104 return err 2105 } 2106 streamWrapper := Watch_WatchServerWrapper{ 2107 Watch_WatchServer: stream, 2108 ctx: ctx, 2109 } 2110 return p.local.Watch(r, streamWrapper) 2111 } 2112 return err 2113 } 2114 ctx, err = p.runCtxMods(ctx, p.remoteCtxMods) 2115 if err != nil { 2116 return err 2117 } 2118 clientStream, err := NewWatchClient(conn).Watch(ctx, r) 2119 2120 if err != nil { 2121 return err 2122 } 2123 2124 for { 2125 msg, err := clientStream.Recv() 2126 if err == io.EOF { 2127 break 2128 } 2129 if err != nil { 2130 return err 2131 } 2132 if err := stream.Send(msg); err != nil { 2133 return err 2134 } 2135 } 2136 return nil 2137} 2138 2139func (m *Object) Size() (n int) { 2140 var l int 2141 _ = l 2142 if m.Object != nil { 2143 n += m.Object.Size() 2144 } 2145 return n 2146} 2147 2148func (m *Object_Node) Size() (n int) { 2149 var l int 2150 _ = l 2151 if m.Node != nil { 2152 l = m.Node.Size() 2153 n += 1 + l + sovWatch(uint64(l)) 2154 } 2155 return n 2156} 2157func (m *Object_Service) Size() (n int) { 2158 var l int 2159 _ = l 2160 if m.Service != nil { 2161 l = m.Service.Size() 2162 n += 1 + l + sovWatch(uint64(l)) 2163 } 2164 return n 2165} 2166func (m *Object_Network) Size() (n int) { 2167 var l int 2168 _ = l 2169 if m.Network != nil { 2170 l = m.Network.Size() 2171 n += 1 + l + sovWatch(uint64(l)) 2172 } 2173 return n 2174} 2175func (m *Object_Task) Size() (n int) { 2176 var l int 2177 _ = l 2178 if m.Task != nil { 2179 l = m.Task.Size() 2180 n += 1 + l + sovWatch(uint64(l)) 2181 } 2182 return n 2183} 2184func (m *Object_Cluster) Size() (n int) { 2185 var l int 2186 _ = l 2187 if m.Cluster != nil { 2188 l = m.Cluster.Size() 2189 n += 1 + l + sovWatch(uint64(l)) 2190 } 2191 return n 2192} 2193func (m *Object_Secret) Size() (n int) { 2194 var l int 2195 _ = l 2196 if m.Secret != nil { 2197 l = m.Secret.Size() 2198 n += 1 + l + sovWatch(uint64(l)) 2199 } 2200 return n 2201} 2202func (m *Object_Resource) Size() (n int) { 2203 var l int 2204 _ = l 2205 if m.Resource != nil { 2206 l = m.Resource.Size() 2207 n += 1 + l + sovWatch(uint64(l)) 2208 } 2209 return n 2210} 2211func (m *Object_Extension) Size() (n int) { 2212 var l int 2213 _ = l 2214 if m.Extension != nil { 2215 l = m.Extension.Size() 2216 n += 1 + l + sovWatch(uint64(l)) 2217 } 2218 return n 2219} 2220func (m *Object_Config) Size() (n int) { 2221 var l int 2222 _ = l 2223 if m.Config != nil { 2224 l = m.Config.Size() 2225 n += 1 + l + sovWatch(uint64(l)) 2226 } 2227 return n 2228} 2229func (m *SelectBySlot) Size() (n int) { 2230 var l int 2231 _ = l 2232 l = len(m.ServiceID) 2233 if l > 0 { 2234 n += 1 + l + sovWatch(uint64(l)) 2235 } 2236 if m.Slot != 0 { 2237 n += 1 + sovWatch(uint64(m.Slot)) 2238 } 2239 return n 2240} 2241 2242func (m *SelectByCustom) Size() (n int) { 2243 var l int 2244 _ = l 2245 l = len(m.Kind) 2246 if l > 0 { 2247 n += 1 + l + sovWatch(uint64(l)) 2248 } 2249 l = len(m.Index) 2250 if l > 0 { 2251 n += 1 + l + sovWatch(uint64(l)) 2252 } 2253 l = len(m.Value) 2254 if l > 0 { 2255 n += 1 + l + sovWatch(uint64(l)) 2256 } 2257 return n 2258} 2259 2260func (m *SelectBy) Size() (n int) { 2261 var l int 2262 _ = l 2263 if m.By != nil { 2264 n += m.By.Size() 2265 } 2266 return n 2267} 2268 2269func (m *SelectBy_ID) Size() (n int) { 2270 var l int 2271 _ = l 2272 l = len(m.ID) 2273 n += 1 + l + sovWatch(uint64(l)) 2274 return n 2275} 2276func (m *SelectBy_IDPrefix) Size() (n int) { 2277 var l int 2278 _ = l 2279 l = len(m.IDPrefix) 2280 n += 1 + l + sovWatch(uint64(l)) 2281 return n 2282} 2283func (m *SelectBy_Name) Size() (n int) { 2284 var l int 2285 _ = l 2286 l = len(m.Name) 2287 n += 1 + l + sovWatch(uint64(l)) 2288 return n 2289} 2290func (m *SelectBy_NamePrefix) Size() (n int) { 2291 var l int 2292 _ = l 2293 l = len(m.NamePrefix) 2294 n += 1 + l + sovWatch(uint64(l)) 2295 return n 2296} 2297func (m *SelectBy_Custom) Size() (n int) { 2298 var l int 2299 _ = l 2300 if m.Custom != nil { 2301 l = m.Custom.Size() 2302 n += 1 + l + sovWatch(uint64(l)) 2303 } 2304 return n 2305} 2306func (m *SelectBy_CustomPrefix) Size() (n int) { 2307 var l int 2308 _ = l 2309 if m.CustomPrefix != nil { 2310 l = m.CustomPrefix.Size() 2311 n += 1 + l + sovWatch(uint64(l)) 2312 } 2313 return n 2314} 2315func (m *SelectBy_ServiceID) Size() (n int) { 2316 var l int 2317 _ = l 2318 l = len(m.ServiceID) 2319 n += 1 + l + sovWatch(uint64(l)) 2320 return n 2321} 2322func (m *SelectBy_NodeID) Size() (n int) { 2323 var l int 2324 _ = l 2325 l = len(m.NodeID) 2326 n += 1 + l + sovWatch(uint64(l)) 2327 return n 2328} 2329func (m *SelectBy_Slot) Size() (n int) { 2330 var l int 2331 _ = l 2332 if m.Slot != nil { 2333 l = m.Slot.Size() 2334 n += 1 + l + sovWatch(uint64(l)) 2335 } 2336 return n 2337} 2338func (m *SelectBy_DesiredState) Size() (n int) { 2339 var l int 2340 _ = l 2341 n += 1 + sovWatch(uint64(m.DesiredState)) 2342 return n 2343} 2344func (m *SelectBy_Role) Size() (n int) { 2345 var l int 2346 _ = l 2347 n += 1 + sovWatch(uint64(m.Role)) 2348 return n 2349} 2350func (m *SelectBy_Membership) Size() (n int) { 2351 var l int 2352 _ = l 2353 n += 1 + sovWatch(uint64(m.Membership)) 2354 return n 2355} 2356func (m *SelectBy_ReferencedNetworkID) Size() (n int) { 2357 var l int 2358 _ = l 2359 l = len(m.ReferencedNetworkID) 2360 n += 1 + l + sovWatch(uint64(l)) 2361 return n 2362} 2363func (m *SelectBy_ReferencedSecretID) Size() (n int) { 2364 var l int 2365 _ = l 2366 l = len(m.ReferencedSecretID) 2367 n += 1 + l + sovWatch(uint64(l)) 2368 return n 2369} 2370func (m *SelectBy_Kind) Size() (n int) { 2371 var l int 2372 _ = l 2373 l = len(m.Kind) 2374 n += 1 + l + sovWatch(uint64(l)) 2375 return n 2376} 2377func (m *SelectBy_ReferencedConfigID) Size() (n int) { 2378 var l int 2379 _ = l 2380 l = len(m.ReferencedConfigID) 2381 n += 2 + l + sovWatch(uint64(l)) 2382 return n 2383} 2384func (m *WatchRequest) Size() (n int) { 2385 var l int 2386 _ = l 2387 if len(m.Entries) > 0 { 2388 for _, e := range m.Entries { 2389 l = e.Size() 2390 n += 1 + l + sovWatch(uint64(l)) 2391 } 2392 } 2393 if m.ResumeFrom != nil { 2394 l = m.ResumeFrom.Size() 2395 n += 1 + l + sovWatch(uint64(l)) 2396 } 2397 if m.IncludeOldObject { 2398 n += 2 2399 } 2400 return n 2401} 2402 2403func (m *WatchRequest_WatchEntry) Size() (n int) { 2404 var l int 2405 _ = l 2406 l = len(m.Kind) 2407 if l > 0 { 2408 n += 1 + l + sovWatch(uint64(l)) 2409 } 2410 if m.Action != 0 { 2411 n += 1 + sovWatch(uint64(m.Action)) 2412 } 2413 if len(m.Filters) > 0 { 2414 for _, e := range m.Filters { 2415 l = e.Size() 2416 n += 1 + l + sovWatch(uint64(l)) 2417 } 2418 } 2419 return n 2420} 2421 2422func (m *WatchMessage) Size() (n int) { 2423 var l int 2424 _ = l 2425 if len(m.Events) > 0 { 2426 for _, e := range m.Events { 2427 l = e.Size() 2428 n += 1 + l + sovWatch(uint64(l)) 2429 } 2430 } 2431 if m.Version != nil { 2432 l = m.Version.Size() 2433 n += 1 + l + sovWatch(uint64(l)) 2434 } 2435 return n 2436} 2437 2438func (m *WatchMessage_Event) Size() (n int) { 2439 var l int 2440 _ = l 2441 if m.Action != 0 { 2442 n += 1 + sovWatch(uint64(m.Action)) 2443 } 2444 if m.Object != nil { 2445 l = m.Object.Size() 2446 n += 1 + l + sovWatch(uint64(l)) 2447 } 2448 if m.OldObject != nil { 2449 l = m.OldObject.Size() 2450 n += 1 + l + sovWatch(uint64(l)) 2451 } 2452 return n 2453} 2454 2455func sovWatch(x uint64) (n int) { 2456 for { 2457 n++ 2458 x >>= 7 2459 if x == 0 { 2460 break 2461 } 2462 } 2463 return n 2464} 2465func sozWatch(x uint64) (n int) { 2466 return sovWatch(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2467} 2468func (this *Object) String() string { 2469 if this == nil { 2470 return "nil" 2471 } 2472 s := strings.Join([]string{`&Object{`, 2473 `Object:` + fmt.Sprintf("%v", this.Object) + `,`, 2474 `}`, 2475 }, "") 2476 return s 2477} 2478func (this *Object_Node) String() string { 2479 if this == nil { 2480 return "nil" 2481 } 2482 s := strings.Join([]string{`&Object_Node{`, 2483 `Node:` + strings.Replace(fmt.Sprintf("%v", this.Node), "Node", "Node", 1) + `,`, 2484 `}`, 2485 }, "") 2486 return s 2487} 2488func (this *Object_Service) String() string { 2489 if this == nil { 2490 return "nil" 2491 } 2492 s := strings.Join([]string{`&Object_Service{`, 2493 `Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "Service", "Service", 1) + `,`, 2494 `}`, 2495 }, "") 2496 return s 2497} 2498func (this *Object_Network) String() string { 2499 if this == nil { 2500 return "nil" 2501 } 2502 s := strings.Join([]string{`&Object_Network{`, 2503 `Network:` + strings.Replace(fmt.Sprintf("%v", this.Network), "Network", "Network", 1) + `,`, 2504 `}`, 2505 }, "") 2506 return s 2507} 2508func (this *Object_Task) String() string { 2509 if this == nil { 2510 return "nil" 2511 } 2512 s := strings.Join([]string{`&Object_Task{`, 2513 `Task:` + strings.Replace(fmt.Sprintf("%v", this.Task), "Task", "Task", 1) + `,`, 2514 `}`, 2515 }, "") 2516 return s 2517} 2518func (this *Object_Cluster) String() string { 2519 if this == nil { 2520 return "nil" 2521 } 2522 s := strings.Join([]string{`&Object_Cluster{`, 2523 `Cluster:` + strings.Replace(fmt.Sprintf("%v", this.Cluster), "Cluster", "Cluster", 1) + `,`, 2524 `}`, 2525 }, "") 2526 return s 2527} 2528func (this *Object_Secret) String() string { 2529 if this == nil { 2530 return "nil" 2531 } 2532 s := strings.Join([]string{`&Object_Secret{`, 2533 `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`, 2534 `}`, 2535 }, "") 2536 return s 2537} 2538func (this *Object_Resource) String() string { 2539 if this == nil { 2540 return "nil" 2541 } 2542 s := strings.Join([]string{`&Object_Resource{`, 2543 `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "Resource", "Resource", 1) + `,`, 2544 `}`, 2545 }, "") 2546 return s 2547} 2548func (this *Object_Extension) String() string { 2549 if this == nil { 2550 return "nil" 2551 } 2552 s := strings.Join([]string{`&Object_Extension{`, 2553 `Extension:` + strings.Replace(fmt.Sprintf("%v", this.Extension), "Extension", "Extension", 1) + `,`, 2554 `}`, 2555 }, "") 2556 return s 2557} 2558func (this *Object_Config) String() string { 2559 if this == nil { 2560 return "nil" 2561 } 2562 s := strings.Join([]string{`&Object_Config{`, 2563 `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "Config", "Config", 1) + `,`, 2564 `}`, 2565 }, "") 2566 return s 2567} 2568func (this *SelectBySlot) String() string { 2569 if this == nil { 2570 return "nil" 2571 } 2572 s := strings.Join([]string{`&SelectBySlot{`, 2573 `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`, 2574 `Slot:` + fmt.Sprintf("%v", this.Slot) + `,`, 2575 `}`, 2576 }, "") 2577 return s 2578} 2579func (this *SelectByCustom) String() string { 2580 if this == nil { 2581 return "nil" 2582 } 2583 s := strings.Join([]string{`&SelectByCustom{`, 2584 `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, 2585 `Index:` + fmt.Sprintf("%v", this.Index) + `,`, 2586 `Value:` + fmt.Sprintf("%v", this.Value) + `,`, 2587 `}`, 2588 }, "") 2589 return s 2590} 2591func (this *SelectBy) String() string { 2592 if this == nil { 2593 return "nil" 2594 } 2595 s := strings.Join([]string{`&SelectBy{`, 2596 `By:` + fmt.Sprintf("%v", this.By) + `,`, 2597 `}`, 2598 }, "") 2599 return s 2600} 2601func (this *SelectBy_ID) String() string { 2602 if this == nil { 2603 return "nil" 2604 } 2605 s := strings.Join([]string{`&SelectBy_ID{`, 2606 `ID:` + fmt.Sprintf("%v", this.ID) + `,`, 2607 `}`, 2608 }, "") 2609 return s 2610} 2611func (this *SelectBy_IDPrefix) String() string { 2612 if this == nil { 2613 return "nil" 2614 } 2615 s := strings.Join([]string{`&SelectBy_IDPrefix{`, 2616 `IDPrefix:` + fmt.Sprintf("%v", this.IDPrefix) + `,`, 2617 `}`, 2618 }, "") 2619 return s 2620} 2621func (this *SelectBy_Name) String() string { 2622 if this == nil { 2623 return "nil" 2624 } 2625 s := strings.Join([]string{`&SelectBy_Name{`, 2626 `Name:` + fmt.Sprintf("%v", this.Name) + `,`, 2627 `}`, 2628 }, "") 2629 return s 2630} 2631func (this *SelectBy_NamePrefix) String() string { 2632 if this == nil { 2633 return "nil" 2634 } 2635 s := strings.Join([]string{`&SelectBy_NamePrefix{`, 2636 `NamePrefix:` + fmt.Sprintf("%v", this.NamePrefix) + `,`, 2637 `}`, 2638 }, "") 2639 return s 2640} 2641func (this *SelectBy_Custom) String() string { 2642 if this == nil { 2643 return "nil" 2644 } 2645 s := strings.Join([]string{`&SelectBy_Custom{`, 2646 `Custom:` + strings.Replace(fmt.Sprintf("%v", this.Custom), "SelectByCustom", "SelectByCustom", 1) + `,`, 2647 `}`, 2648 }, "") 2649 return s 2650} 2651func (this *SelectBy_CustomPrefix) String() string { 2652 if this == nil { 2653 return "nil" 2654 } 2655 s := strings.Join([]string{`&SelectBy_CustomPrefix{`, 2656 `CustomPrefix:` + strings.Replace(fmt.Sprintf("%v", this.CustomPrefix), "SelectByCustom", "SelectByCustom", 1) + `,`, 2657 `}`, 2658 }, "") 2659 return s 2660} 2661func (this *SelectBy_ServiceID) String() string { 2662 if this == nil { 2663 return "nil" 2664 } 2665 s := strings.Join([]string{`&SelectBy_ServiceID{`, 2666 `ServiceID:` + fmt.Sprintf("%v", this.ServiceID) + `,`, 2667 `}`, 2668 }, "") 2669 return s 2670} 2671func (this *SelectBy_NodeID) String() string { 2672 if this == nil { 2673 return "nil" 2674 } 2675 s := strings.Join([]string{`&SelectBy_NodeID{`, 2676 `NodeID:` + fmt.Sprintf("%v", this.NodeID) + `,`, 2677 `}`, 2678 }, "") 2679 return s 2680} 2681func (this *SelectBy_Slot) String() string { 2682 if this == nil { 2683 return "nil" 2684 } 2685 s := strings.Join([]string{`&SelectBy_Slot{`, 2686 `Slot:` + strings.Replace(fmt.Sprintf("%v", this.Slot), "SelectBySlot", "SelectBySlot", 1) + `,`, 2687 `}`, 2688 }, "") 2689 return s 2690} 2691func (this *SelectBy_DesiredState) String() string { 2692 if this == nil { 2693 return "nil" 2694 } 2695 s := strings.Join([]string{`&SelectBy_DesiredState{`, 2696 `DesiredState:` + fmt.Sprintf("%v", this.DesiredState) + `,`, 2697 `}`, 2698 }, "") 2699 return s 2700} 2701func (this *SelectBy_Role) String() string { 2702 if this == nil { 2703 return "nil" 2704 } 2705 s := strings.Join([]string{`&SelectBy_Role{`, 2706 `Role:` + fmt.Sprintf("%v", this.Role) + `,`, 2707 `}`, 2708 }, "") 2709 return s 2710} 2711func (this *SelectBy_Membership) String() string { 2712 if this == nil { 2713 return "nil" 2714 } 2715 s := strings.Join([]string{`&SelectBy_Membership{`, 2716 `Membership:` + fmt.Sprintf("%v", this.Membership) + `,`, 2717 `}`, 2718 }, "") 2719 return s 2720} 2721func (this *SelectBy_ReferencedNetworkID) String() string { 2722 if this == nil { 2723 return "nil" 2724 } 2725 s := strings.Join([]string{`&SelectBy_ReferencedNetworkID{`, 2726 `ReferencedNetworkID:` + fmt.Sprintf("%v", this.ReferencedNetworkID) + `,`, 2727 `}`, 2728 }, "") 2729 return s 2730} 2731func (this *SelectBy_ReferencedSecretID) String() string { 2732 if this == nil { 2733 return "nil" 2734 } 2735 s := strings.Join([]string{`&SelectBy_ReferencedSecretID{`, 2736 `ReferencedSecretID:` + fmt.Sprintf("%v", this.ReferencedSecretID) + `,`, 2737 `}`, 2738 }, "") 2739 return s 2740} 2741func (this *SelectBy_Kind) String() string { 2742 if this == nil { 2743 return "nil" 2744 } 2745 s := strings.Join([]string{`&SelectBy_Kind{`, 2746 `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, 2747 `}`, 2748 }, "") 2749 return s 2750} 2751func (this *SelectBy_ReferencedConfigID) String() string { 2752 if this == nil { 2753 return "nil" 2754 } 2755 s := strings.Join([]string{`&SelectBy_ReferencedConfigID{`, 2756 `ReferencedConfigID:` + fmt.Sprintf("%v", this.ReferencedConfigID) + `,`, 2757 `}`, 2758 }, "") 2759 return s 2760} 2761func (this *WatchRequest) String() string { 2762 if this == nil { 2763 return "nil" 2764 } 2765 s := strings.Join([]string{`&WatchRequest{`, 2766 `Entries:` + strings.Replace(fmt.Sprintf("%v", this.Entries), "WatchRequest_WatchEntry", "WatchRequest_WatchEntry", 1) + `,`, 2767 `ResumeFrom:` + strings.Replace(fmt.Sprintf("%v", this.ResumeFrom), "Version", "Version", 1) + `,`, 2768 `IncludeOldObject:` + fmt.Sprintf("%v", this.IncludeOldObject) + `,`, 2769 `}`, 2770 }, "") 2771 return s 2772} 2773func (this *WatchRequest_WatchEntry) String() string { 2774 if this == nil { 2775 return "nil" 2776 } 2777 s := strings.Join([]string{`&WatchRequest_WatchEntry{`, 2778 `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, 2779 `Action:` + fmt.Sprintf("%v", this.Action) + `,`, 2780 `Filters:` + strings.Replace(fmt.Sprintf("%v", this.Filters), "SelectBy", "SelectBy", 1) + `,`, 2781 `}`, 2782 }, "") 2783 return s 2784} 2785func (this *WatchMessage) String() string { 2786 if this == nil { 2787 return "nil" 2788 } 2789 s := strings.Join([]string{`&WatchMessage{`, 2790 `Events:` + strings.Replace(fmt.Sprintf("%v", this.Events), "WatchMessage_Event", "WatchMessage_Event", 1) + `,`, 2791 `Version:` + strings.Replace(fmt.Sprintf("%v", this.Version), "Version", "Version", 1) + `,`, 2792 `}`, 2793 }, "") 2794 return s 2795} 2796func (this *WatchMessage_Event) String() string { 2797 if this == nil { 2798 return "nil" 2799 } 2800 s := strings.Join([]string{`&WatchMessage_Event{`, 2801 `Action:` + fmt.Sprintf("%v", this.Action) + `,`, 2802 `Object:` + strings.Replace(fmt.Sprintf("%v", this.Object), "Object", "Object", 1) + `,`, 2803 `OldObject:` + strings.Replace(fmt.Sprintf("%v", this.OldObject), "Object", "Object", 1) + `,`, 2804 `}`, 2805 }, "") 2806 return s 2807} 2808func valueToStringWatch(v interface{}) string { 2809 rv := reflect.ValueOf(v) 2810 if rv.IsNil() { 2811 return "nil" 2812 } 2813 pv := reflect.Indirect(rv).Interface() 2814 return fmt.Sprintf("*%v", pv) 2815} 2816func (m *Object) Unmarshal(dAtA []byte) error { 2817 l := len(dAtA) 2818 iNdEx := 0 2819 for iNdEx < l { 2820 preIndex := iNdEx 2821 var wire uint64 2822 for shift := uint(0); ; shift += 7 { 2823 if shift >= 64 { 2824 return ErrIntOverflowWatch 2825 } 2826 if iNdEx >= l { 2827 return io.ErrUnexpectedEOF 2828 } 2829 b := dAtA[iNdEx] 2830 iNdEx++ 2831 wire |= (uint64(b) & 0x7F) << shift 2832 if b < 0x80 { 2833 break 2834 } 2835 } 2836 fieldNum := int32(wire >> 3) 2837 wireType := int(wire & 0x7) 2838 if wireType == 4 { 2839 return fmt.Errorf("proto: Object: wiretype end group for non-group") 2840 } 2841 if fieldNum <= 0 { 2842 return fmt.Errorf("proto: Object: illegal tag %d (wire type %d)", fieldNum, wire) 2843 } 2844 switch fieldNum { 2845 case 1: 2846 if wireType != 2 { 2847 return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) 2848 } 2849 var msglen int 2850 for shift := uint(0); ; shift += 7 { 2851 if shift >= 64 { 2852 return ErrIntOverflowWatch 2853 } 2854 if iNdEx >= l { 2855 return io.ErrUnexpectedEOF 2856 } 2857 b := dAtA[iNdEx] 2858 iNdEx++ 2859 msglen |= (int(b) & 0x7F) << shift 2860 if b < 0x80 { 2861 break 2862 } 2863 } 2864 if msglen < 0 { 2865 return ErrInvalidLengthWatch 2866 } 2867 postIndex := iNdEx + msglen 2868 if postIndex > l { 2869 return io.ErrUnexpectedEOF 2870 } 2871 v := &Node{} 2872 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2873 return err 2874 } 2875 m.Object = &Object_Node{v} 2876 iNdEx = postIndex 2877 case 2: 2878 if wireType != 2 { 2879 return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) 2880 } 2881 var msglen int 2882 for shift := uint(0); ; shift += 7 { 2883 if shift >= 64 { 2884 return ErrIntOverflowWatch 2885 } 2886 if iNdEx >= l { 2887 return io.ErrUnexpectedEOF 2888 } 2889 b := dAtA[iNdEx] 2890 iNdEx++ 2891 msglen |= (int(b) & 0x7F) << shift 2892 if b < 0x80 { 2893 break 2894 } 2895 } 2896 if msglen < 0 { 2897 return ErrInvalidLengthWatch 2898 } 2899 postIndex := iNdEx + msglen 2900 if postIndex > l { 2901 return io.ErrUnexpectedEOF 2902 } 2903 v := &Service{} 2904 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2905 return err 2906 } 2907 m.Object = &Object_Service{v} 2908 iNdEx = postIndex 2909 case 3: 2910 if wireType != 2 { 2911 return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) 2912 } 2913 var msglen int 2914 for shift := uint(0); ; shift += 7 { 2915 if shift >= 64 { 2916 return ErrIntOverflowWatch 2917 } 2918 if iNdEx >= l { 2919 return io.ErrUnexpectedEOF 2920 } 2921 b := dAtA[iNdEx] 2922 iNdEx++ 2923 msglen |= (int(b) & 0x7F) << shift 2924 if b < 0x80 { 2925 break 2926 } 2927 } 2928 if msglen < 0 { 2929 return ErrInvalidLengthWatch 2930 } 2931 postIndex := iNdEx + msglen 2932 if postIndex > l { 2933 return io.ErrUnexpectedEOF 2934 } 2935 v := &Network{} 2936 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2937 return err 2938 } 2939 m.Object = &Object_Network{v} 2940 iNdEx = postIndex 2941 case 4: 2942 if wireType != 2 { 2943 return fmt.Errorf("proto: wrong wireType = %d for field Task", wireType) 2944 } 2945 var msglen int 2946 for shift := uint(0); ; shift += 7 { 2947 if shift >= 64 { 2948 return ErrIntOverflowWatch 2949 } 2950 if iNdEx >= l { 2951 return io.ErrUnexpectedEOF 2952 } 2953 b := dAtA[iNdEx] 2954 iNdEx++ 2955 msglen |= (int(b) & 0x7F) << shift 2956 if b < 0x80 { 2957 break 2958 } 2959 } 2960 if msglen < 0 { 2961 return ErrInvalidLengthWatch 2962 } 2963 postIndex := iNdEx + msglen 2964 if postIndex > l { 2965 return io.ErrUnexpectedEOF 2966 } 2967 v := &Task{} 2968 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2969 return err 2970 } 2971 m.Object = &Object_Task{v} 2972 iNdEx = postIndex 2973 case 5: 2974 if wireType != 2 { 2975 return fmt.Errorf("proto: wrong wireType = %d for field Cluster", wireType) 2976 } 2977 var msglen int 2978 for shift := uint(0); ; shift += 7 { 2979 if shift >= 64 { 2980 return ErrIntOverflowWatch 2981 } 2982 if iNdEx >= l { 2983 return io.ErrUnexpectedEOF 2984 } 2985 b := dAtA[iNdEx] 2986 iNdEx++ 2987 msglen |= (int(b) & 0x7F) << shift 2988 if b < 0x80 { 2989 break 2990 } 2991 } 2992 if msglen < 0 { 2993 return ErrInvalidLengthWatch 2994 } 2995 postIndex := iNdEx + msglen 2996 if postIndex > l { 2997 return io.ErrUnexpectedEOF 2998 } 2999 v := &Cluster{} 3000 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3001 return err 3002 } 3003 m.Object = &Object_Cluster{v} 3004 iNdEx = postIndex 3005 case 6: 3006 if wireType != 2 { 3007 return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) 3008 } 3009 var msglen int 3010 for shift := uint(0); ; shift += 7 { 3011 if shift >= 64 { 3012 return ErrIntOverflowWatch 3013 } 3014 if iNdEx >= l { 3015 return io.ErrUnexpectedEOF 3016 } 3017 b := dAtA[iNdEx] 3018 iNdEx++ 3019 msglen |= (int(b) & 0x7F) << shift 3020 if b < 0x80 { 3021 break 3022 } 3023 } 3024 if msglen < 0 { 3025 return ErrInvalidLengthWatch 3026 } 3027 postIndex := iNdEx + msglen 3028 if postIndex > l { 3029 return io.ErrUnexpectedEOF 3030 } 3031 v := &Secret{} 3032 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3033 return err 3034 } 3035 m.Object = &Object_Secret{v} 3036 iNdEx = postIndex 3037 case 7: 3038 if wireType != 2 { 3039 return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) 3040 } 3041 var msglen int 3042 for shift := uint(0); ; shift += 7 { 3043 if shift >= 64 { 3044 return ErrIntOverflowWatch 3045 } 3046 if iNdEx >= l { 3047 return io.ErrUnexpectedEOF 3048 } 3049 b := dAtA[iNdEx] 3050 iNdEx++ 3051 msglen |= (int(b) & 0x7F) << shift 3052 if b < 0x80 { 3053 break 3054 } 3055 } 3056 if msglen < 0 { 3057 return ErrInvalidLengthWatch 3058 } 3059 postIndex := iNdEx + msglen 3060 if postIndex > l { 3061 return io.ErrUnexpectedEOF 3062 } 3063 v := &Resource{} 3064 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3065 return err 3066 } 3067 m.Object = &Object_Resource{v} 3068 iNdEx = postIndex 3069 case 8: 3070 if wireType != 2 { 3071 return fmt.Errorf("proto: wrong wireType = %d for field Extension", wireType) 3072 } 3073 var msglen int 3074 for shift := uint(0); ; shift += 7 { 3075 if shift >= 64 { 3076 return ErrIntOverflowWatch 3077 } 3078 if iNdEx >= l { 3079 return io.ErrUnexpectedEOF 3080 } 3081 b := dAtA[iNdEx] 3082 iNdEx++ 3083 msglen |= (int(b) & 0x7F) << shift 3084 if b < 0x80 { 3085 break 3086 } 3087 } 3088 if msglen < 0 { 3089 return ErrInvalidLengthWatch 3090 } 3091 postIndex := iNdEx + msglen 3092 if postIndex > l { 3093 return io.ErrUnexpectedEOF 3094 } 3095 v := &Extension{} 3096 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3097 return err 3098 } 3099 m.Object = &Object_Extension{v} 3100 iNdEx = postIndex 3101 case 9: 3102 if wireType != 2 { 3103 return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) 3104 } 3105 var msglen int 3106 for shift := uint(0); ; shift += 7 { 3107 if shift >= 64 { 3108 return ErrIntOverflowWatch 3109 } 3110 if iNdEx >= l { 3111 return io.ErrUnexpectedEOF 3112 } 3113 b := dAtA[iNdEx] 3114 iNdEx++ 3115 msglen |= (int(b) & 0x7F) << shift 3116 if b < 0x80 { 3117 break 3118 } 3119 } 3120 if msglen < 0 { 3121 return ErrInvalidLengthWatch 3122 } 3123 postIndex := iNdEx + msglen 3124 if postIndex > l { 3125 return io.ErrUnexpectedEOF 3126 } 3127 v := &Config{} 3128 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3129 return err 3130 } 3131 m.Object = &Object_Config{v} 3132 iNdEx = postIndex 3133 default: 3134 iNdEx = preIndex 3135 skippy, err := skipWatch(dAtA[iNdEx:]) 3136 if err != nil { 3137 return err 3138 } 3139 if skippy < 0 { 3140 return ErrInvalidLengthWatch 3141 } 3142 if (iNdEx + skippy) > l { 3143 return io.ErrUnexpectedEOF 3144 } 3145 iNdEx += skippy 3146 } 3147 } 3148 3149 if iNdEx > l { 3150 return io.ErrUnexpectedEOF 3151 } 3152 return nil 3153} 3154func (m *SelectBySlot) Unmarshal(dAtA []byte) error { 3155 l := len(dAtA) 3156 iNdEx := 0 3157 for iNdEx < l { 3158 preIndex := iNdEx 3159 var wire uint64 3160 for shift := uint(0); ; shift += 7 { 3161 if shift >= 64 { 3162 return ErrIntOverflowWatch 3163 } 3164 if iNdEx >= l { 3165 return io.ErrUnexpectedEOF 3166 } 3167 b := dAtA[iNdEx] 3168 iNdEx++ 3169 wire |= (uint64(b) & 0x7F) << shift 3170 if b < 0x80 { 3171 break 3172 } 3173 } 3174 fieldNum := int32(wire >> 3) 3175 wireType := int(wire & 0x7) 3176 if wireType == 4 { 3177 return fmt.Errorf("proto: SelectBySlot: wiretype end group for non-group") 3178 } 3179 if fieldNum <= 0 { 3180 return fmt.Errorf("proto: SelectBySlot: illegal tag %d (wire type %d)", fieldNum, wire) 3181 } 3182 switch fieldNum { 3183 case 1: 3184 if wireType != 2 { 3185 return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType) 3186 } 3187 var stringLen uint64 3188 for shift := uint(0); ; shift += 7 { 3189 if shift >= 64 { 3190 return ErrIntOverflowWatch 3191 } 3192 if iNdEx >= l { 3193 return io.ErrUnexpectedEOF 3194 } 3195 b := dAtA[iNdEx] 3196 iNdEx++ 3197 stringLen |= (uint64(b) & 0x7F) << shift 3198 if b < 0x80 { 3199 break 3200 } 3201 } 3202 intStringLen := int(stringLen) 3203 if intStringLen < 0 { 3204 return ErrInvalidLengthWatch 3205 } 3206 postIndex := iNdEx + intStringLen 3207 if postIndex > l { 3208 return io.ErrUnexpectedEOF 3209 } 3210 m.ServiceID = string(dAtA[iNdEx:postIndex]) 3211 iNdEx = postIndex 3212 case 2: 3213 if wireType != 0 { 3214 return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) 3215 } 3216 m.Slot = 0 3217 for shift := uint(0); ; shift += 7 { 3218 if shift >= 64 { 3219 return ErrIntOverflowWatch 3220 } 3221 if iNdEx >= l { 3222 return io.ErrUnexpectedEOF 3223 } 3224 b := dAtA[iNdEx] 3225 iNdEx++ 3226 m.Slot |= (uint64(b) & 0x7F) << shift 3227 if b < 0x80 { 3228 break 3229 } 3230 } 3231 default: 3232 iNdEx = preIndex 3233 skippy, err := skipWatch(dAtA[iNdEx:]) 3234 if err != nil { 3235 return err 3236 } 3237 if skippy < 0 { 3238 return ErrInvalidLengthWatch 3239 } 3240 if (iNdEx + skippy) > l { 3241 return io.ErrUnexpectedEOF 3242 } 3243 iNdEx += skippy 3244 } 3245 } 3246 3247 if iNdEx > l { 3248 return io.ErrUnexpectedEOF 3249 } 3250 return nil 3251} 3252func (m *SelectByCustom) Unmarshal(dAtA []byte) error { 3253 l := len(dAtA) 3254 iNdEx := 0 3255 for iNdEx < l { 3256 preIndex := iNdEx 3257 var wire uint64 3258 for shift := uint(0); ; shift += 7 { 3259 if shift >= 64 { 3260 return ErrIntOverflowWatch 3261 } 3262 if iNdEx >= l { 3263 return io.ErrUnexpectedEOF 3264 } 3265 b := dAtA[iNdEx] 3266 iNdEx++ 3267 wire |= (uint64(b) & 0x7F) << shift 3268 if b < 0x80 { 3269 break 3270 } 3271 } 3272 fieldNum := int32(wire >> 3) 3273 wireType := int(wire & 0x7) 3274 if wireType == 4 { 3275 return fmt.Errorf("proto: SelectByCustom: wiretype end group for non-group") 3276 } 3277 if fieldNum <= 0 { 3278 return fmt.Errorf("proto: SelectByCustom: illegal tag %d (wire type %d)", fieldNum, wire) 3279 } 3280 switch fieldNum { 3281 case 1: 3282 if wireType != 2 { 3283 return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) 3284 } 3285 var stringLen uint64 3286 for shift := uint(0); ; shift += 7 { 3287 if shift >= 64 { 3288 return ErrIntOverflowWatch 3289 } 3290 if iNdEx >= l { 3291 return io.ErrUnexpectedEOF 3292 } 3293 b := dAtA[iNdEx] 3294 iNdEx++ 3295 stringLen |= (uint64(b) & 0x7F) << shift 3296 if b < 0x80 { 3297 break 3298 } 3299 } 3300 intStringLen := int(stringLen) 3301 if intStringLen < 0 { 3302 return ErrInvalidLengthWatch 3303 } 3304 postIndex := iNdEx + intStringLen 3305 if postIndex > l { 3306 return io.ErrUnexpectedEOF 3307 } 3308 m.Kind = string(dAtA[iNdEx:postIndex]) 3309 iNdEx = postIndex 3310 case 2: 3311 if wireType != 2 { 3312 return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) 3313 } 3314 var stringLen uint64 3315 for shift := uint(0); ; shift += 7 { 3316 if shift >= 64 { 3317 return ErrIntOverflowWatch 3318 } 3319 if iNdEx >= l { 3320 return io.ErrUnexpectedEOF 3321 } 3322 b := dAtA[iNdEx] 3323 iNdEx++ 3324 stringLen |= (uint64(b) & 0x7F) << shift 3325 if b < 0x80 { 3326 break 3327 } 3328 } 3329 intStringLen := int(stringLen) 3330 if intStringLen < 0 { 3331 return ErrInvalidLengthWatch 3332 } 3333 postIndex := iNdEx + intStringLen 3334 if postIndex > l { 3335 return io.ErrUnexpectedEOF 3336 } 3337 m.Index = string(dAtA[iNdEx:postIndex]) 3338 iNdEx = postIndex 3339 case 3: 3340 if wireType != 2 { 3341 return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) 3342 } 3343 var stringLen uint64 3344 for shift := uint(0); ; shift += 7 { 3345 if shift >= 64 { 3346 return ErrIntOverflowWatch 3347 } 3348 if iNdEx >= l { 3349 return io.ErrUnexpectedEOF 3350 } 3351 b := dAtA[iNdEx] 3352 iNdEx++ 3353 stringLen |= (uint64(b) & 0x7F) << shift 3354 if b < 0x80 { 3355 break 3356 } 3357 } 3358 intStringLen := int(stringLen) 3359 if intStringLen < 0 { 3360 return ErrInvalidLengthWatch 3361 } 3362 postIndex := iNdEx + intStringLen 3363 if postIndex > l { 3364 return io.ErrUnexpectedEOF 3365 } 3366 m.Value = string(dAtA[iNdEx:postIndex]) 3367 iNdEx = postIndex 3368 default: 3369 iNdEx = preIndex 3370 skippy, err := skipWatch(dAtA[iNdEx:]) 3371 if err != nil { 3372 return err 3373 } 3374 if skippy < 0 { 3375 return ErrInvalidLengthWatch 3376 } 3377 if (iNdEx + skippy) > l { 3378 return io.ErrUnexpectedEOF 3379 } 3380 iNdEx += skippy 3381 } 3382 } 3383 3384 if iNdEx > l { 3385 return io.ErrUnexpectedEOF 3386 } 3387 return nil 3388} 3389func (m *SelectBy) Unmarshal(dAtA []byte) error { 3390 l := len(dAtA) 3391 iNdEx := 0 3392 for iNdEx < l { 3393 preIndex := iNdEx 3394 var wire uint64 3395 for shift := uint(0); ; shift += 7 { 3396 if shift >= 64 { 3397 return ErrIntOverflowWatch 3398 } 3399 if iNdEx >= l { 3400 return io.ErrUnexpectedEOF 3401 } 3402 b := dAtA[iNdEx] 3403 iNdEx++ 3404 wire |= (uint64(b) & 0x7F) << shift 3405 if b < 0x80 { 3406 break 3407 } 3408 } 3409 fieldNum := int32(wire >> 3) 3410 wireType := int(wire & 0x7) 3411 if wireType == 4 { 3412 return fmt.Errorf("proto: SelectBy: wiretype end group for non-group") 3413 } 3414 if fieldNum <= 0 { 3415 return fmt.Errorf("proto: SelectBy: illegal tag %d (wire type %d)", fieldNum, wire) 3416 } 3417 switch fieldNum { 3418 case 1: 3419 if wireType != 2 { 3420 return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) 3421 } 3422 var stringLen uint64 3423 for shift := uint(0); ; shift += 7 { 3424 if shift >= 64 { 3425 return ErrIntOverflowWatch 3426 } 3427 if iNdEx >= l { 3428 return io.ErrUnexpectedEOF 3429 } 3430 b := dAtA[iNdEx] 3431 iNdEx++ 3432 stringLen |= (uint64(b) & 0x7F) << shift 3433 if b < 0x80 { 3434 break 3435 } 3436 } 3437 intStringLen := int(stringLen) 3438 if intStringLen < 0 { 3439 return ErrInvalidLengthWatch 3440 } 3441 postIndex := iNdEx + intStringLen 3442 if postIndex > l { 3443 return io.ErrUnexpectedEOF 3444 } 3445 m.By = &SelectBy_ID{string(dAtA[iNdEx:postIndex])} 3446 iNdEx = postIndex 3447 case 2: 3448 if wireType != 2 { 3449 return fmt.Errorf("proto: wrong wireType = %d for field IDPrefix", wireType) 3450 } 3451 var stringLen uint64 3452 for shift := uint(0); ; shift += 7 { 3453 if shift >= 64 { 3454 return ErrIntOverflowWatch 3455 } 3456 if iNdEx >= l { 3457 return io.ErrUnexpectedEOF 3458 } 3459 b := dAtA[iNdEx] 3460 iNdEx++ 3461 stringLen |= (uint64(b) & 0x7F) << shift 3462 if b < 0x80 { 3463 break 3464 } 3465 } 3466 intStringLen := int(stringLen) 3467 if intStringLen < 0 { 3468 return ErrInvalidLengthWatch 3469 } 3470 postIndex := iNdEx + intStringLen 3471 if postIndex > l { 3472 return io.ErrUnexpectedEOF 3473 } 3474 m.By = &SelectBy_IDPrefix{string(dAtA[iNdEx:postIndex])} 3475 iNdEx = postIndex 3476 case 3: 3477 if wireType != 2 { 3478 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 3479 } 3480 var stringLen uint64 3481 for shift := uint(0); ; shift += 7 { 3482 if shift >= 64 { 3483 return ErrIntOverflowWatch 3484 } 3485 if iNdEx >= l { 3486 return io.ErrUnexpectedEOF 3487 } 3488 b := dAtA[iNdEx] 3489 iNdEx++ 3490 stringLen |= (uint64(b) & 0x7F) << shift 3491 if b < 0x80 { 3492 break 3493 } 3494 } 3495 intStringLen := int(stringLen) 3496 if intStringLen < 0 { 3497 return ErrInvalidLengthWatch 3498 } 3499 postIndex := iNdEx + intStringLen 3500 if postIndex > l { 3501 return io.ErrUnexpectedEOF 3502 } 3503 m.By = &SelectBy_Name{string(dAtA[iNdEx:postIndex])} 3504 iNdEx = postIndex 3505 case 4: 3506 if wireType != 2 { 3507 return fmt.Errorf("proto: wrong wireType = %d for field NamePrefix", wireType) 3508 } 3509 var stringLen uint64 3510 for shift := uint(0); ; shift += 7 { 3511 if shift >= 64 { 3512 return ErrIntOverflowWatch 3513 } 3514 if iNdEx >= l { 3515 return io.ErrUnexpectedEOF 3516 } 3517 b := dAtA[iNdEx] 3518 iNdEx++ 3519 stringLen |= (uint64(b) & 0x7F) << shift 3520 if b < 0x80 { 3521 break 3522 } 3523 } 3524 intStringLen := int(stringLen) 3525 if intStringLen < 0 { 3526 return ErrInvalidLengthWatch 3527 } 3528 postIndex := iNdEx + intStringLen 3529 if postIndex > l { 3530 return io.ErrUnexpectedEOF 3531 } 3532 m.By = &SelectBy_NamePrefix{string(dAtA[iNdEx:postIndex])} 3533 iNdEx = postIndex 3534 case 5: 3535 if wireType != 2 { 3536 return fmt.Errorf("proto: wrong wireType = %d for field Custom", wireType) 3537 } 3538 var msglen int 3539 for shift := uint(0); ; shift += 7 { 3540 if shift >= 64 { 3541 return ErrIntOverflowWatch 3542 } 3543 if iNdEx >= l { 3544 return io.ErrUnexpectedEOF 3545 } 3546 b := dAtA[iNdEx] 3547 iNdEx++ 3548 msglen |= (int(b) & 0x7F) << shift 3549 if b < 0x80 { 3550 break 3551 } 3552 } 3553 if msglen < 0 { 3554 return ErrInvalidLengthWatch 3555 } 3556 postIndex := iNdEx + msglen 3557 if postIndex > l { 3558 return io.ErrUnexpectedEOF 3559 } 3560 v := &SelectByCustom{} 3561 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3562 return err 3563 } 3564 m.By = &SelectBy_Custom{v} 3565 iNdEx = postIndex 3566 case 6: 3567 if wireType != 2 { 3568 return fmt.Errorf("proto: wrong wireType = %d for field CustomPrefix", wireType) 3569 } 3570 var msglen int 3571 for shift := uint(0); ; shift += 7 { 3572 if shift >= 64 { 3573 return ErrIntOverflowWatch 3574 } 3575 if iNdEx >= l { 3576 return io.ErrUnexpectedEOF 3577 } 3578 b := dAtA[iNdEx] 3579 iNdEx++ 3580 msglen |= (int(b) & 0x7F) << shift 3581 if b < 0x80 { 3582 break 3583 } 3584 } 3585 if msglen < 0 { 3586 return ErrInvalidLengthWatch 3587 } 3588 postIndex := iNdEx + msglen 3589 if postIndex > l { 3590 return io.ErrUnexpectedEOF 3591 } 3592 v := &SelectByCustom{} 3593 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3594 return err 3595 } 3596 m.By = &SelectBy_CustomPrefix{v} 3597 iNdEx = postIndex 3598 case 7: 3599 if wireType != 2 { 3600 return fmt.Errorf("proto: wrong wireType = %d for field ServiceID", wireType) 3601 } 3602 var stringLen uint64 3603 for shift := uint(0); ; shift += 7 { 3604 if shift >= 64 { 3605 return ErrIntOverflowWatch 3606 } 3607 if iNdEx >= l { 3608 return io.ErrUnexpectedEOF 3609 } 3610 b := dAtA[iNdEx] 3611 iNdEx++ 3612 stringLen |= (uint64(b) & 0x7F) << shift 3613 if b < 0x80 { 3614 break 3615 } 3616 } 3617 intStringLen := int(stringLen) 3618 if intStringLen < 0 { 3619 return ErrInvalidLengthWatch 3620 } 3621 postIndex := iNdEx + intStringLen 3622 if postIndex > l { 3623 return io.ErrUnexpectedEOF 3624 } 3625 m.By = &SelectBy_ServiceID{string(dAtA[iNdEx:postIndex])} 3626 iNdEx = postIndex 3627 case 8: 3628 if wireType != 2 { 3629 return fmt.Errorf("proto: wrong wireType = %d for field NodeID", wireType) 3630 } 3631 var stringLen uint64 3632 for shift := uint(0); ; shift += 7 { 3633 if shift >= 64 { 3634 return ErrIntOverflowWatch 3635 } 3636 if iNdEx >= l { 3637 return io.ErrUnexpectedEOF 3638 } 3639 b := dAtA[iNdEx] 3640 iNdEx++ 3641 stringLen |= (uint64(b) & 0x7F) << shift 3642 if b < 0x80 { 3643 break 3644 } 3645 } 3646 intStringLen := int(stringLen) 3647 if intStringLen < 0 { 3648 return ErrInvalidLengthWatch 3649 } 3650 postIndex := iNdEx + intStringLen 3651 if postIndex > l { 3652 return io.ErrUnexpectedEOF 3653 } 3654 m.By = &SelectBy_NodeID{string(dAtA[iNdEx:postIndex])} 3655 iNdEx = postIndex 3656 case 9: 3657 if wireType != 2 { 3658 return fmt.Errorf("proto: wrong wireType = %d for field Slot", wireType) 3659 } 3660 var msglen int 3661 for shift := uint(0); ; shift += 7 { 3662 if shift >= 64 { 3663 return ErrIntOverflowWatch 3664 } 3665 if iNdEx >= l { 3666 return io.ErrUnexpectedEOF 3667 } 3668 b := dAtA[iNdEx] 3669 iNdEx++ 3670 msglen |= (int(b) & 0x7F) << shift 3671 if b < 0x80 { 3672 break 3673 } 3674 } 3675 if msglen < 0 { 3676 return ErrInvalidLengthWatch 3677 } 3678 postIndex := iNdEx + msglen 3679 if postIndex > l { 3680 return io.ErrUnexpectedEOF 3681 } 3682 v := &SelectBySlot{} 3683 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3684 return err 3685 } 3686 m.By = &SelectBy_Slot{v} 3687 iNdEx = postIndex 3688 case 10: 3689 if wireType != 0 { 3690 return fmt.Errorf("proto: wrong wireType = %d for field DesiredState", wireType) 3691 } 3692 var v TaskState 3693 for shift := uint(0); ; shift += 7 { 3694 if shift >= 64 { 3695 return ErrIntOverflowWatch 3696 } 3697 if iNdEx >= l { 3698 return io.ErrUnexpectedEOF 3699 } 3700 b := dAtA[iNdEx] 3701 iNdEx++ 3702 v |= (TaskState(b) & 0x7F) << shift 3703 if b < 0x80 { 3704 break 3705 } 3706 } 3707 m.By = &SelectBy_DesiredState{v} 3708 case 11: 3709 if wireType != 0 { 3710 return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) 3711 } 3712 var v NodeRole 3713 for shift := uint(0); ; shift += 7 { 3714 if shift >= 64 { 3715 return ErrIntOverflowWatch 3716 } 3717 if iNdEx >= l { 3718 return io.ErrUnexpectedEOF 3719 } 3720 b := dAtA[iNdEx] 3721 iNdEx++ 3722 v |= (NodeRole(b) & 0x7F) << shift 3723 if b < 0x80 { 3724 break 3725 } 3726 } 3727 m.By = &SelectBy_Role{v} 3728 case 12: 3729 if wireType != 0 { 3730 return fmt.Errorf("proto: wrong wireType = %d for field Membership", wireType) 3731 } 3732 var v NodeSpec_Membership 3733 for shift := uint(0); ; shift += 7 { 3734 if shift >= 64 { 3735 return ErrIntOverflowWatch 3736 } 3737 if iNdEx >= l { 3738 return io.ErrUnexpectedEOF 3739 } 3740 b := dAtA[iNdEx] 3741 iNdEx++ 3742 v |= (NodeSpec_Membership(b) & 0x7F) << shift 3743 if b < 0x80 { 3744 break 3745 } 3746 } 3747 m.By = &SelectBy_Membership{v} 3748 case 13: 3749 if wireType != 2 { 3750 return fmt.Errorf("proto: wrong wireType = %d for field ReferencedNetworkID", wireType) 3751 } 3752 var stringLen uint64 3753 for shift := uint(0); ; shift += 7 { 3754 if shift >= 64 { 3755 return ErrIntOverflowWatch 3756 } 3757 if iNdEx >= l { 3758 return io.ErrUnexpectedEOF 3759 } 3760 b := dAtA[iNdEx] 3761 iNdEx++ 3762 stringLen |= (uint64(b) & 0x7F) << shift 3763 if b < 0x80 { 3764 break 3765 } 3766 } 3767 intStringLen := int(stringLen) 3768 if intStringLen < 0 { 3769 return ErrInvalidLengthWatch 3770 } 3771 postIndex := iNdEx + intStringLen 3772 if postIndex > l { 3773 return io.ErrUnexpectedEOF 3774 } 3775 m.By = &SelectBy_ReferencedNetworkID{string(dAtA[iNdEx:postIndex])} 3776 iNdEx = postIndex 3777 case 14: 3778 if wireType != 2 { 3779 return fmt.Errorf("proto: wrong wireType = %d for field ReferencedSecretID", wireType) 3780 } 3781 var stringLen uint64 3782 for shift := uint(0); ; shift += 7 { 3783 if shift >= 64 { 3784 return ErrIntOverflowWatch 3785 } 3786 if iNdEx >= l { 3787 return io.ErrUnexpectedEOF 3788 } 3789 b := dAtA[iNdEx] 3790 iNdEx++ 3791 stringLen |= (uint64(b) & 0x7F) << shift 3792 if b < 0x80 { 3793 break 3794 } 3795 } 3796 intStringLen := int(stringLen) 3797 if intStringLen < 0 { 3798 return ErrInvalidLengthWatch 3799 } 3800 postIndex := iNdEx + intStringLen 3801 if postIndex > l { 3802 return io.ErrUnexpectedEOF 3803 } 3804 m.By = &SelectBy_ReferencedSecretID{string(dAtA[iNdEx:postIndex])} 3805 iNdEx = postIndex 3806 case 15: 3807 if wireType != 2 { 3808 return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) 3809 } 3810 var stringLen uint64 3811 for shift := uint(0); ; shift += 7 { 3812 if shift >= 64 { 3813 return ErrIntOverflowWatch 3814 } 3815 if iNdEx >= l { 3816 return io.ErrUnexpectedEOF 3817 } 3818 b := dAtA[iNdEx] 3819 iNdEx++ 3820 stringLen |= (uint64(b) & 0x7F) << shift 3821 if b < 0x80 { 3822 break 3823 } 3824 } 3825 intStringLen := int(stringLen) 3826 if intStringLen < 0 { 3827 return ErrInvalidLengthWatch 3828 } 3829 postIndex := iNdEx + intStringLen 3830 if postIndex > l { 3831 return io.ErrUnexpectedEOF 3832 } 3833 m.By = &SelectBy_Kind{string(dAtA[iNdEx:postIndex])} 3834 iNdEx = postIndex 3835 case 16: 3836 if wireType != 2 { 3837 return fmt.Errorf("proto: wrong wireType = %d for field ReferencedConfigID", wireType) 3838 } 3839 var stringLen uint64 3840 for shift := uint(0); ; shift += 7 { 3841 if shift >= 64 { 3842 return ErrIntOverflowWatch 3843 } 3844 if iNdEx >= l { 3845 return io.ErrUnexpectedEOF 3846 } 3847 b := dAtA[iNdEx] 3848 iNdEx++ 3849 stringLen |= (uint64(b) & 0x7F) << shift 3850 if b < 0x80 { 3851 break 3852 } 3853 } 3854 intStringLen := int(stringLen) 3855 if intStringLen < 0 { 3856 return ErrInvalidLengthWatch 3857 } 3858 postIndex := iNdEx + intStringLen 3859 if postIndex > l { 3860 return io.ErrUnexpectedEOF 3861 } 3862 m.By = &SelectBy_ReferencedConfigID{string(dAtA[iNdEx:postIndex])} 3863 iNdEx = postIndex 3864 default: 3865 iNdEx = preIndex 3866 skippy, err := skipWatch(dAtA[iNdEx:]) 3867 if err != nil { 3868 return err 3869 } 3870 if skippy < 0 { 3871 return ErrInvalidLengthWatch 3872 } 3873 if (iNdEx + skippy) > l { 3874 return io.ErrUnexpectedEOF 3875 } 3876 iNdEx += skippy 3877 } 3878 } 3879 3880 if iNdEx > l { 3881 return io.ErrUnexpectedEOF 3882 } 3883 return nil 3884} 3885func (m *WatchRequest) Unmarshal(dAtA []byte) error { 3886 l := len(dAtA) 3887 iNdEx := 0 3888 for iNdEx < l { 3889 preIndex := iNdEx 3890 var wire uint64 3891 for shift := uint(0); ; shift += 7 { 3892 if shift >= 64 { 3893 return ErrIntOverflowWatch 3894 } 3895 if iNdEx >= l { 3896 return io.ErrUnexpectedEOF 3897 } 3898 b := dAtA[iNdEx] 3899 iNdEx++ 3900 wire |= (uint64(b) & 0x7F) << shift 3901 if b < 0x80 { 3902 break 3903 } 3904 } 3905 fieldNum := int32(wire >> 3) 3906 wireType := int(wire & 0x7) 3907 if wireType == 4 { 3908 return fmt.Errorf("proto: WatchRequest: wiretype end group for non-group") 3909 } 3910 if fieldNum <= 0 { 3911 return fmt.Errorf("proto: WatchRequest: illegal tag %d (wire type %d)", fieldNum, wire) 3912 } 3913 switch fieldNum { 3914 case 1: 3915 if wireType != 2 { 3916 return fmt.Errorf("proto: wrong wireType = %d for field Entries", wireType) 3917 } 3918 var msglen int 3919 for shift := uint(0); ; shift += 7 { 3920 if shift >= 64 { 3921 return ErrIntOverflowWatch 3922 } 3923 if iNdEx >= l { 3924 return io.ErrUnexpectedEOF 3925 } 3926 b := dAtA[iNdEx] 3927 iNdEx++ 3928 msglen |= (int(b) & 0x7F) << shift 3929 if b < 0x80 { 3930 break 3931 } 3932 } 3933 if msglen < 0 { 3934 return ErrInvalidLengthWatch 3935 } 3936 postIndex := iNdEx + msglen 3937 if postIndex > l { 3938 return io.ErrUnexpectedEOF 3939 } 3940 m.Entries = append(m.Entries, &WatchRequest_WatchEntry{}) 3941 if err := m.Entries[len(m.Entries)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3942 return err 3943 } 3944 iNdEx = postIndex 3945 case 2: 3946 if wireType != 2 { 3947 return fmt.Errorf("proto: wrong wireType = %d for field ResumeFrom", wireType) 3948 } 3949 var msglen int 3950 for shift := uint(0); ; shift += 7 { 3951 if shift >= 64 { 3952 return ErrIntOverflowWatch 3953 } 3954 if iNdEx >= l { 3955 return io.ErrUnexpectedEOF 3956 } 3957 b := dAtA[iNdEx] 3958 iNdEx++ 3959 msglen |= (int(b) & 0x7F) << shift 3960 if b < 0x80 { 3961 break 3962 } 3963 } 3964 if msglen < 0 { 3965 return ErrInvalidLengthWatch 3966 } 3967 postIndex := iNdEx + msglen 3968 if postIndex > l { 3969 return io.ErrUnexpectedEOF 3970 } 3971 if m.ResumeFrom == nil { 3972 m.ResumeFrom = &Version{} 3973 } 3974 if err := m.ResumeFrom.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3975 return err 3976 } 3977 iNdEx = postIndex 3978 case 3: 3979 if wireType != 0 { 3980 return fmt.Errorf("proto: wrong wireType = %d for field IncludeOldObject", wireType) 3981 } 3982 var v int 3983 for shift := uint(0); ; shift += 7 { 3984 if shift >= 64 { 3985 return ErrIntOverflowWatch 3986 } 3987 if iNdEx >= l { 3988 return io.ErrUnexpectedEOF 3989 } 3990 b := dAtA[iNdEx] 3991 iNdEx++ 3992 v |= (int(b) & 0x7F) << shift 3993 if b < 0x80 { 3994 break 3995 } 3996 } 3997 m.IncludeOldObject = bool(v != 0) 3998 default: 3999 iNdEx = preIndex 4000 skippy, err := skipWatch(dAtA[iNdEx:]) 4001 if err != nil { 4002 return err 4003 } 4004 if skippy < 0 { 4005 return ErrInvalidLengthWatch 4006 } 4007 if (iNdEx + skippy) > l { 4008 return io.ErrUnexpectedEOF 4009 } 4010 iNdEx += skippy 4011 } 4012 } 4013 4014 if iNdEx > l { 4015 return io.ErrUnexpectedEOF 4016 } 4017 return nil 4018} 4019func (m *WatchRequest_WatchEntry) Unmarshal(dAtA []byte) error { 4020 l := len(dAtA) 4021 iNdEx := 0 4022 for iNdEx < l { 4023 preIndex := iNdEx 4024 var wire uint64 4025 for shift := uint(0); ; shift += 7 { 4026 if shift >= 64 { 4027 return ErrIntOverflowWatch 4028 } 4029 if iNdEx >= l { 4030 return io.ErrUnexpectedEOF 4031 } 4032 b := dAtA[iNdEx] 4033 iNdEx++ 4034 wire |= (uint64(b) & 0x7F) << shift 4035 if b < 0x80 { 4036 break 4037 } 4038 } 4039 fieldNum := int32(wire >> 3) 4040 wireType := int(wire & 0x7) 4041 if wireType == 4 { 4042 return fmt.Errorf("proto: WatchEntry: wiretype end group for non-group") 4043 } 4044 if fieldNum <= 0 { 4045 return fmt.Errorf("proto: WatchEntry: illegal tag %d (wire type %d)", fieldNum, wire) 4046 } 4047 switch fieldNum { 4048 case 1: 4049 if wireType != 2 { 4050 return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) 4051 } 4052 var stringLen uint64 4053 for shift := uint(0); ; shift += 7 { 4054 if shift >= 64 { 4055 return ErrIntOverflowWatch 4056 } 4057 if iNdEx >= l { 4058 return io.ErrUnexpectedEOF 4059 } 4060 b := dAtA[iNdEx] 4061 iNdEx++ 4062 stringLen |= (uint64(b) & 0x7F) << shift 4063 if b < 0x80 { 4064 break 4065 } 4066 } 4067 intStringLen := int(stringLen) 4068 if intStringLen < 0 { 4069 return ErrInvalidLengthWatch 4070 } 4071 postIndex := iNdEx + intStringLen 4072 if postIndex > l { 4073 return io.ErrUnexpectedEOF 4074 } 4075 m.Kind = string(dAtA[iNdEx:postIndex]) 4076 iNdEx = postIndex 4077 case 2: 4078 if wireType != 0 { 4079 return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) 4080 } 4081 m.Action = 0 4082 for shift := uint(0); ; shift += 7 { 4083 if shift >= 64 { 4084 return ErrIntOverflowWatch 4085 } 4086 if iNdEx >= l { 4087 return io.ErrUnexpectedEOF 4088 } 4089 b := dAtA[iNdEx] 4090 iNdEx++ 4091 m.Action |= (WatchActionKind(b) & 0x7F) << shift 4092 if b < 0x80 { 4093 break 4094 } 4095 } 4096 case 3: 4097 if wireType != 2 { 4098 return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) 4099 } 4100 var msglen int 4101 for shift := uint(0); ; shift += 7 { 4102 if shift >= 64 { 4103 return ErrIntOverflowWatch 4104 } 4105 if iNdEx >= l { 4106 return io.ErrUnexpectedEOF 4107 } 4108 b := dAtA[iNdEx] 4109 iNdEx++ 4110 msglen |= (int(b) & 0x7F) << shift 4111 if b < 0x80 { 4112 break 4113 } 4114 } 4115 if msglen < 0 { 4116 return ErrInvalidLengthWatch 4117 } 4118 postIndex := iNdEx + msglen 4119 if postIndex > l { 4120 return io.ErrUnexpectedEOF 4121 } 4122 m.Filters = append(m.Filters, &SelectBy{}) 4123 if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4124 return err 4125 } 4126 iNdEx = postIndex 4127 default: 4128 iNdEx = preIndex 4129 skippy, err := skipWatch(dAtA[iNdEx:]) 4130 if err != nil { 4131 return err 4132 } 4133 if skippy < 0 { 4134 return ErrInvalidLengthWatch 4135 } 4136 if (iNdEx + skippy) > l { 4137 return io.ErrUnexpectedEOF 4138 } 4139 iNdEx += skippy 4140 } 4141 } 4142 4143 if iNdEx > l { 4144 return io.ErrUnexpectedEOF 4145 } 4146 return nil 4147} 4148func (m *WatchMessage) Unmarshal(dAtA []byte) error { 4149 l := len(dAtA) 4150 iNdEx := 0 4151 for iNdEx < l { 4152 preIndex := iNdEx 4153 var wire uint64 4154 for shift := uint(0); ; shift += 7 { 4155 if shift >= 64 { 4156 return ErrIntOverflowWatch 4157 } 4158 if iNdEx >= l { 4159 return io.ErrUnexpectedEOF 4160 } 4161 b := dAtA[iNdEx] 4162 iNdEx++ 4163 wire |= (uint64(b) & 0x7F) << shift 4164 if b < 0x80 { 4165 break 4166 } 4167 } 4168 fieldNum := int32(wire >> 3) 4169 wireType := int(wire & 0x7) 4170 if wireType == 4 { 4171 return fmt.Errorf("proto: WatchMessage: wiretype end group for non-group") 4172 } 4173 if fieldNum <= 0 { 4174 return fmt.Errorf("proto: WatchMessage: illegal tag %d (wire type %d)", fieldNum, wire) 4175 } 4176 switch fieldNum { 4177 case 1: 4178 if wireType != 2 { 4179 return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) 4180 } 4181 var msglen int 4182 for shift := uint(0); ; shift += 7 { 4183 if shift >= 64 { 4184 return ErrIntOverflowWatch 4185 } 4186 if iNdEx >= l { 4187 return io.ErrUnexpectedEOF 4188 } 4189 b := dAtA[iNdEx] 4190 iNdEx++ 4191 msglen |= (int(b) & 0x7F) << shift 4192 if b < 0x80 { 4193 break 4194 } 4195 } 4196 if msglen < 0 { 4197 return ErrInvalidLengthWatch 4198 } 4199 postIndex := iNdEx + msglen 4200 if postIndex > l { 4201 return io.ErrUnexpectedEOF 4202 } 4203 m.Events = append(m.Events, &WatchMessage_Event{}) 4204 if err := m.Events[len(m.Events)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4205 return err 4206 } 4207 iNdEx = postIndex 4208 case 2: 4209 if wireType != 2 { 4210 return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) 4211 } 4212 var msglen int 4213 for shift := uint(0); ; shift += 7 { 4214 if shift >= 64 { 4215 return ErrIntOverflowWatch 4216 } 4217 if iNdEx >= l { 4218 return io.ErrUnexpectedEOF 4219 } 4220 b := dAtA[iNdEx] 4221 iNdEx++ 4222 msglen |= (int(b) & 0x7F) << shift 4223 if b < 0x80 { 4224 break 4225 } 4226 } 4227 if msglen < 0 { 4228 return ErrInvalidLengthWatch 4229 } 4230 postIndex := iNdEx + msglen 4231 if postIndex > l { 4232 return io.ErrUnexpectedEOF 4233 } 4234 if m.Version == nil { 4235 m.Version = &Version{} 4236 } 4237 if err := m.Version.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4238 return err 4239 } 4240 iNdEx = postIndex 4241 default: 4242 iNdEx = preIndex 4243 skippy, err := skipWatch(dAtA[iNdEx:]) 4244 if err != nil { 4245 return err 4246 } 4247 if skippy < 0 { 4248 return ErrInvalidLengthWatch 4249 } 4250 if (iNdEx + skippy) > l { 4251 return io.ErrUnexpectedEOF 4252 } 4253 iNdEx += skippy 4254 } 4255 } 4256 4257 if iNdEx > l { 4258 return io.ErrUnexpectedEOF 4259 } 4260 return nil 4261} 4262func (m *WatchMessage_Event) Unmarshal(dAtA []byte) error { 4263 l := len(dAtA) 4264 iNdEx := 0 4265 for iNdEx < l { 4266 preIndex := iNdEx 4267 var wire uint64 4268 for shift := uint(0); ; shift += 7 { 4269 if shift >= 64 { 4270 return ErrIntOverflowWatch 4271 } 4272 if iNdEx >= l { 4273 return io.ErrUnexpectedEOF 4274 } 4275 b := dAtA[iNdEx] 4276 iNdEx++ 4277 wire |= (uint64(b) & 0x7F) << shift 4278 if b < 0x80 { 4279 break 4280 } 4281 } 4282 fieldNum := int32(wire >> 3) 4283 wireType := int(wire & 0x7) 4284 if wireType == 4 { 4285 return fmt.Errorf("proto: Event: wiretype end group for non-group") 4286 } 4287 if fieldNum <= 0 { 4288 return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) 4289 } 4290 switch fieldNum { 4291 case 1: 4292 if wireType != 0 { 4293 return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) 4294 } 4295 m.Action = 0 4296 for shift := uint(0); ; shift += 7 { 4297 if shift >= 64 { 4298 return ErrIntOverflowWatch 4299 } 4300 if iNdEx >= l { 4301 return io.ErrUnexpectedEOF 4302 } 4303 b := dAtA[iNdEx] 4304 iNdEx++ 4305 m.Action |= (WatchActionKind(b) & 0x7F) << shift 4306 if b < 0x80 { 4307 break 4308 } 4309 } 4310 case 2: 4311 if wireType != 2 { 4312 return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) 4313 } 4314 var msglen int 4315 for shift := uint(0); ; shift += 7 { 4316 if shift >= 64 { 4317 return ErrIntOverflowWatch 4318 } 4319 if iNdEx >= l { 4320 return io.ErrUnexpectedEOF 4321 } 4322 b := dAtA[iNdEx] 4323 iNdEx++ 4324 msglen |= (int(b) & 0x7F) << shift 4325 if b < 0x80 { 4326 break 4327 } 4328 } 4329 if msglen < 0 { 4330 return ErrInvalidLengthWatch 4331 } 4332 postIndex := iNdEx + msglen 4333 if postIndex > l { 4334 return io.ErrUnexpectedEOF 4335 } 4336 if m.Object == nil { 4337 m.Object = &Object{} 4338 } 4339 if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4340 return err 4341 } 4342 iNdEx = postIndex 4343 case 3: 4344 if wireType != 2 { 4345 return fmt.Errorf("proto: wrong wireType = %d for field OldObject", wireType) 4346 } 4347 var msglen int 4348 for shift := uint(0); ; shift += 7 { 4349 if shift >= 64 { 4350 return ErrIntOverflowWatch 4351 } 4352 if iNdEx >= l { 4353 return io.ErrUnexpectedEOF 4354 } 4355 b := dAtA[iNdEx] 4356 iNdEx++ 4357 msglen |= (int(b) & 0x7F) << shift 4358 if b < 0x80 { 4359 break 4360 } 4361 } 4362 if msglen < 0 { 4363 return ErrInvalidLengthWatch 4364 } 4365 postIndex := iNdEx + msglen 4366 if postIndex > l { 4367 return io.ErrUnexpectedEOF 4368 } 4369 if m.OldObject == nil { 4370 m.OldObject = &Object{} 4371 } 4372 if err := m.OldObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 4373 return err 4374 } 4375 iNdEx = postIndex 4376 default: 4377 iNdEx = preIndex 4378 skippy, err := skipWatch(dAtA[iNdEx:]) 4379 if err != nil { 4380 return err 4381 } 4382 if skippy < 0 { 4383 return ErrInvalidLengthWatch 4384 } 4385 if (iNdEx + skippy) > l { 4386 return io.ErrUnexpectedEOF 4387 } 4388 iNdEx += skippy 4389 } 4390 } 4391 4392 if iNdEx > l { 4393 return io.ErrUnexpectedEOF 4394 } 4395 return nil 4396} 4397func skipWatch(dAtA []byte) (n int, err error) { 4398 l := len(dAtA) 4399 iNdEx := 0 4400 for iNdEx < l { 4401 var wire uint64 4402 for shift := uint(0); ; shift += 7 { 4403 if shift >= 64 { 4404 return 0, ErrIntOverflowWatch 4405 } 4406 if iNdEx >= l { 4407 return 0, io.ErrUnexpectedEOF 4408 } 4409 b := dAtA[iNdEx] 4410 iNdEx++ 4411 wire |= (uint64(b) & 0x7F) << shift 4412 if b < 0x80 { 4413 break 4414 } 4415 } 4416 wireType := int(wire & 0x7) 4417 switch wireType { 4418 case 0: 4419 for shift := uint(0); ; shift += 7 { 4420 if shift >= 64 { 4421 return 0, ErrIntOverflowWatch 4422 } 4423 if iNdEx >= l { 4424 return 0, io.ErrUnexpectedEOF 4425 } 4426 iNdEx++ 4427 if dAtA[iNdEx-1] < 0x80 { 4428 break 4429 } 4430 } 4431 return iNdEx, nil 4432 case 1: 4433 iNdEx += 8 4434 return iNdEx, nil 4435 case 2: 4436 var length int 4437 for shift := uint(0); ; shift += 7 { 4438 if shift >= 64 { 4439 return 0, ErrIntOverflowWatch 4440 } 4441 if iNdEx >= l { 4442 return 0, io.ErrUnexpectedEOF 4443 } 4444 b := dAtA[iNdEx] 4445 iNdEx++ 4446 length |= (int(b) & 0x7F) << shift 4447 if b < 0x80 { 4448 break 4449 } 4450 } 4451 iNdEx += length 4452 if length < 0 { 4453 return 0, ErrInvalidLengthWatch 4454 } 4455 return iNdEx, nil 4456 case 3: 4457 for { 4458 var innerWire uint64 4459 var start int = iNdEx 4460 for shift := uint(0); ; shift += 7 { 4461 if shift >= 64 { 4462 return 0, ErrIntOverflowWatch 4463 } 4464 if iNdEx >= l { 4465 return 0, io.ErrUnexpectedEOF 4466 } 4467 b := dAtA[iNdEx] 4468 iNdEx++ 4469 innerWire |= (uint64(b) & 0x7F) << shift 4470 if b < 0x80 { 4471 break 4472 } 4473 } 4474 innerWireType := int(innerWire & 0x7) 4475 if innerWireType == 4 { 4476 break 4477 } 4478 next, err := skipWatch(dAtA[start:]) 4479 if err != nil { 4480 return 0, err 4481 } 4482 iNdEx = start + next 4483 } 4484 return iNdEx, nil 4485 case 4: 4486 return iNdEx, nil 4487 case 5: 4488 iNdEx += 4 4489 return iNdEx, nil 4490 default: 4491 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4492 } 4493 } 4494 panic("unreachable") 4495} 4496 4497var ( 4498 ErrInvalidLengthWatch = fmt.Errorf("proto: negative length found during unmarshaling") 4499 ErrIntOverflowWatch = fmt.Errorf("proto: integer overflow") 4500) 4501 4502func init() { proto.RegisterFile("github.com/docker/swarmkit/api/watch.proto", fileDescriptorWatch) } 4503 4504var fileDescriptorWatch = []byte{ 4505 // 1186 bytes of a gzipped FileDescriptorProto 4506 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x96, 0xbd, 0x73, 0x1b, 0xc5, 4507 0x1b, 0xc7, 0x75, 0x8a, 0x7c, 0x92, 0x1e, 0xdb, 0x89, 0x67, 0xe3, 0x24, 0xf7, 0xd3, 0x2f, 0xc8, 4508 0x42, 0x0c, 0x90, 0x49, 0x82, 0x0c, 0x26, 0x24, 0x03, 0x04, 0x66, 0x2c, 0x59, 0x8c, 0x44, 0xc6, 4509 0x2f, 0xb3, 0xb6, 0x93, 0x52, 0x73, 0xbe, 0x7b, 0xac, 0x1c, 0xba, 0xbb, 0x15, 0x7b, 0x27, 0x39, 4510 0xee, 0x28, 0x28, 0x98, 0xf4, 0xcc, 0xd0, 0xa4, 0x82, 0x9a, 0x86, 0x0e, 0xfe, 0x81, 0x0c, 0x15, 4511 0x25, 0x34, 0x1a, 0xa2, 0x92, 0x82, 0xbf, 0x80, 0x82, 0xd9, 0x97, 0xf3, 0x8b, 0x72, 0xb2, 0x49, 4512 0xa5, 0xbd, 0xbd, 0xcf, 0xf7, 0xd9, 0x67, 0x9f, 0xb7, 0x13, 0xdc, 0xec, 0x7a, 0xf1, 0xe3, 0xc1, 4513 0x5e, 0xcd, 0x61, 0xc1, 0xb2, 0xcb, 0x9c, 0x1e, 0xf2, 0xe5, 0xe8, 0xc0, 0xe6, 0x41, 0xcf, 0x8b, 4514 0x97, 0xed, 0xbe, 0xb7, 0x7c, 0x60, 0xc7, 0xce, 0xe3, 0x5a, 0x9f, 0xb3, 0x98, 0x11, 0xa2, 0x80, 4515 0x5a, 0x02, 0xd4, 0x86, 0xef, 0x95, 0xce, 0xd3, 0x47, 0x7d, 0x74, 0x22, 0xa5, 0x2f, 0xdd, 0x3e, 4516 0x87, 0x65, 0x7b, 0x5f, 0xa0, 0x13, 0x27, 0xf4, 0x79, 0x96, 0xe3, 0xc3, 0x3e, 0x26, 0xec, 0x62, 4517 0x97, 0x75, 0x99, 0x5c, 0x2e, 0x8b, 0x95, 0xde, 0xbd, 0x77, 0x86, 0x05, 0x49, 0xec, 0x0d, 0xf6, 4518 0x97, 0xfb, 0xfe, 0xa0, 0xeb, 0x85, 0xfa, 0x47, 0x09, 0xab, 0x5f, 0xe7, 0xc0, 0xdc, 0x94, 0xce, 4519 0x90, 0x1a, 0xe4, 0x42, 0xe6, 0xa2, 0x65, 0x54, 0x8c, 0x1b, 0xb3, 0x2b, 0x56, 0xed, 0xe5, 0x10, 4520 0xd4, 0x36, 0x98, 0x8b, 0xad, 0x0c, 0x95, 0x1c, 0xb9, 0x07, 0xf9, 0x08, 0xf9, 0xd0, 0x73, 0xd0, 4521 0xca, 0x4a, 0xc9, 0xff, 0xd3, 0x24, 0xdb, 0x0a, 0x69, 0x65, 0x68, 0x42, 0x0b, 0x61, 0x88, 0xf1, 4522 0x01, 0xe3, 0x3d, 0xeb, 0xc2, 0x74, 0xe1, 0x86, 0x42, 0x84, 0x50, 0xd3, 0xc2, 0xc3, 0xd8, 0x8e, 4523 0x7a, 0x56, 0x6e, 0xba, 0x87, 0x3b, 0x76, 0x24, 0x24, 0x92, 0x13, 0x07, 0x39, 0xfe, 0x20, 0x8a, 4524 0x91, 0x5b, 0x33, 0xd3, 0x0f, 0x6a, 0x28, 0x44, 0x1c, 0xa4, 0x69, 0x72, 0x07, 0xcc, 0x08, 0x1d, 4525 0x8e, 0xb1, 0x65, 0x4a, 0x5d, 0x29, 0xfd, 0x66, 0x82, 0x68, 0x65, 0xa8, 0x66, 0xc9, 0x47, 0x50, 4526 0xe0, 0x18, 0xb1, 0x01, 0x77, 0xd0, 0xca, 0x4b, 0xdd, 0xf5, 0x34, 0x1d, 0xd5, 0x4c, 0x2b, 0x43, 4527 0x8f, 0x78, 0xf2, 0x09, 0x14, 0xf1, 0x49, 0x8c, 0x61, 0xe4, 0xb1, 0xd0, 0x2a, 0x48, 0xf1, 0x6b, 4528 0x69, 0xe2, 0x66, 0x02, 0xb5, 0x32, 0xf4, 0x58, 0x21, 0x1c, 0x76, 0x58, 0xb8, 0xef, 0x75, 0xad, 4529 0xe2, 0x74, 0x87, 0x1b, 0x92, 0x10, 0x0e, 0x2b, 0xb6, 0x5e, 0x48, 0x72, 0x5f, 0xdd, 0x82, 0xb9, 4530 0x6d, 0xf4, 0xd1, 0x89, 0xeb, 0x87, 0xdb, 0x3e, 0x8b, 0xc9, 0x6d, 0x00, 0x9d, 0xad, 0x8e, 0xe7, 4531 0xca, 0x8a, 0x28, 0xd6, 0xe7, 0xc7, 0xa3, 0xa5, 0xa2, 0x4e, 0x67, 0x7b, 0x8d, 0x16, 0x35, 0xd0, 4532 0x76, 0x09, 0x81, 0x5c, 0xe4, 0xb3, 0x58, 0x96, 0x41, 0x8e, 0xca, 0x75, 0x75, 0x0b, 0x2e, 0x26, 4533 0x16, 0x1b, 0x83, 0x28, 0x66, 0x81, 0xa0, 0x7a, 0x5e, 0xa8, 0xad, 0x51, 0xb9, 0x26, 0x8b, 0x30, 4534 0xe3, 0x85, 0x2e, 0x3e, 0x91, 0xd2, 0x22, 0x55, 0x0f, 0x62, 0x77, 0x68, 0xfb, 0x03, 0x94, 0xe5, 4535 0x51, 0xa4, 0xea, 0xa1, 0xfa, 0x97, 0x09, 0x85, 0xc4, 0x24, 0xb1, 0x20, 0x7b, 0xe4, 0x98, 0x39, 4536 0x1e, 0x2d, 0x65, 0xdb, 0x6b, 0xad, 0x0c, 0xcd, 0x7a, 0x2e, 0xb9, 0x05, 0x45, 0xcf, 0xed, 0xf4, 4537 0x39, 0xee, 0x7b, 0xda, 0x6c, 0x7d, 0x6e, 0x3c, 0x5a, 0x2a, 0xb4, 0xd7, 0xb6, 0xe4, 0x9e, 0x08, 4538 0xbb, 0xe7, 0xaa, 0x35, 0x59, 0x84, 0x5c, 0x68, 0x07, 0xfa, 0x20, 0x59, 0xd9, 0x76, 0x80, 0xe4, 4539 0x75, 0x98, 0x15, 0xbf, 0x89, 0x91, 0x9c, 0x7e, 0x09, 0x62, 0x53, 0x0b, 0xef, 0x83, 0xe9, 0xc8, 4540 0x6b, 0xe9, 0xca, 0xaa, 0xa6, 0x57, 0xc8, 0xc9, 0x00, 0xc8, 0xc0, 0xab, 0x50, 0xb4, 0x61, 0x5e, 4541 0xad, 0x92, 0x23, 0xcc, 0x57, 0x30, 0x32, 0xa7, 0xa4, 0xda, 0x91, 0xda, 0xa9, 0x4c, 0xe5, 0x53, 4542 0x32, 0x25, 0x2a, 0xe5, 0x38, 0x57, 0x6f, 0x42, 0x5e, 0x74, 0xaf, 0x80, 0x0b, 0x12, 0x86, 0xf1, 4543 0x68, 0xc9, 0x14, 0x8d, 0x2d, 0x49, 0x53, 0xbc, 0x6c, 0xbb, 0xe4, 0xae, 0x4e, 0xa9, 0x2a, 0xa7, 4544 0xca, 0x59, 0x8e, 0x89, 0x82, 0x11, 0xa1, 0x13, 0x3c, 0x59, 0x83, 0x79, 0x17, 0x23, 0x8f, 0xa3, 4545 0xdb, 0x89, 0x62, 0x3b, 0x46, 0x0b, 0x2a, 0xc6, 0x8d, 0x8b, 0xe9, 0xb5, 0x2c, 0x7a, 0x75, 0x5b, 4546 0x40, 0xe2, 0x52, 0x5a, 0x25, 0x9f, 0xc9, 0x0a, 0xe4, 0x38, 0xf3, 0xd1, 0x9a, 0x95, 0xe2, 0xeb, 4547 0xd3, 0x46, 0x11, 0x65, 0xbe, 0x1c, 0x47, 0x82, 0x25, 0x6d, 0x80, 0x00, 0x83, 0x3d, 0xe4, 0xd1, 4548 0x63, 0xaf, 0x6f, 0xcd, 0x49, 0xe5, 0xdb, 0xd3, 0x94, 0xdb, 0x7d, 0x74, 0x6a, 0xeb, 0x47, 0xb8, 4549 0x48, 0xee, 0xb1, 0x98, 0xac, 0xc3, 0x15, 0x8e, 0xfb, 0xc8, 0x31, 0x74, 0xd0, 0xed, 0xe8, 0xe9, 4550 0x23, 0x22, 0x36, 0x2f, 0x23, 0x76, 0x6d, 0x3c, 0x5a, 0xba, 0x4c, 0x8f, 0x00, 0x3d, 0xa8, 0x64, 4551 0xf8, 0x2e, 0xf3, 0x97, 0xb6, 0x5d, 0xf2, 0x39, 0x2c, 0x9e, 0x30, 0xa7, 0x86, 0x85, 0xb0, 0x76, 4552 0x51, 0x5a, 0xbb, 0x3a, 0x1e, 0x2d, 0x91, 0x63, 0x6b, 0x6a, 0xaa, 0x48, 0x63, 0x84, 0x4f, 0xee, 4553 0x8a, 0x86, 0x51, 0x4d, 0x74, 0x29, 0x29, 0x58, 0xd9, 0x46, 0xa7, 0x4f, 0x50, 0xdd, 0x2d, 0x4e, 4554 0x58, 0x48, 0x3b, 0x41, 0x8d, 0x81, 0xc9, 0x13, 0xf4, 0xae, 0x5b, 0xcf, 0x41, 0xb6, 0x7e, 0x58, 4555 0xfd, 0x23, 0x0b, 0x73, 0x8f, 0xc4, 0x07, 0x91, 0xe2, 0x97, 0x03, 0x8c, 0x62, 0xd2, 0x84, 0x3c, 4556 0x86, 0x31, 0xf7, 0x30, 0xb2, 0x8c, 0xca, 0x85, 0x1b, 0xb3, 0x2b, 0xb7, 0xd2, 0x62, 0x7b, 0x52, 4557 0xa2, 0x1e, 0x9a, 0x61, 0xcc, 0x0f, 0x69, 0xa2, 0x25, 0xf7, 0x61, 0x96, 0x63, 0x34, 0x08, 0xb0, 4558 0xb3, 0xcf, 0x59, 0x70, 0xd6, 0x87, 0xe3, 0x21, 0x72, 0x31, 0xda, 0x28, 0x28, 0xfe, 0x33, 0xce, 4559 0x02, 0x72, 0x1b, 0x88, 0x17, 0x3a, 0xfe, 0xc0, 0xc5, 0x0e, 0xf3, 0xdd, 0x8e, 0xfa, 0x8a, 0xca, 4560 0xe6, 0x2d, 0xd0, 0x05, 0xfd, 0x66, 0xd3, 0x77, 0xd5, 0x50, 0x2b, 0x7d, 0x6b, 0x00, 0x1c, 0xfb, 4561 0x90, 0x3a, 0x7f, 0x3e, 0x06, 0xd3, 0x76, 0x62, 0x31, 0x73, 0xb3, 0xb2, 0x60, 0xde, 0x98, 0x7a, 4562 0xa9, 0x55, 0x89, 0x3d, 0xf0, 0x42, 0x97, 0x6a, 0x09, 0xb9, 0x0b, 0xf9, 0x7d, 0xcf, 0x8f, 0x91, 4563 0x47, 0xd6, 0x05, 0x19, 0x92, 0xeb, 0x67, 0xb5, 0x09, 0x4d, 0xe0, 0xea, 0x2f, 0x49, 0x6c, 0xd7, 4564 0x31, 0x8a, 0xec, 0x2e, 0x92, 0x4f, 0xc1, 0xc4, 0x21, 0x86, 0x71, 0x12, 0xda, 0xb7, 0xa6, 0x7a, 4565 0xa1, 0x15, 0xb5, 0xa6, 0xc0, 0xa9, 0x56, 0x91, 0x0f, 0x20, 0x3f, 0x54, 0xd1, 0xfa, 0x2f, 0x01, 4566 0x4d, 0xd8, 0xd2, 0x4f, 0x06, 0xcc, 0x48, 0x43, 0x27, 0xc2, 0x60, 0xbc, 0x7a, 0x18, 0x56, 0xc0, 4567 0xd4, 0x89, 0xc8, 0x4e, 0xff, 0xf6, 0xa8, 0x94, 0x50, 0x4d, 0x92, 0x0f, 0x01, 0x26, 0x12, 0x78, 4568 0xb6, 0xae, 0xc8, 0x92, 0xac, 0xde, 0xfc, 0xc7, 0x80, 0x4b, 0x13, 0xae, 0x90, 0x3b, 0xb0, 0xf8, 4569 0x68, 0x75, 0xa7, 0xd1, 0xea, 0xac, 0x36, 0x76, 0xda, 0x9b, 0x1b, 0x9d, 0xdd, 0x8d, 0x07, 0x1b, 4570 0x9b, 0x8f, 0x36, 0x16, 0x32, 0xa5, 0xd2, 0xd3, 0x67, 0x95, 0xab, 0x13, 0xf8, 0x6e, 0xd8, 0x0b, 4571 0xd9, 0x81, 0x70, 0xfc, 0xf2, 0x29, 0x55, 0x83, 0x36, 0x57, 0x77, 0x9a, 0x0b, 0x46, 0xe9, 0x7f, 4572 0x4f, 0x9f, 0x55, 0xae, 0x4c, 0x88, 0x1a, 0x1c, 0xd5, 0x64, 0x3a, 0xad, 0xd9, 0xdd, 0x5a, 0x13, 4573 0x9a, 0x6c, 0xaa, 0x66, 0xb7, 0xef, 0xa6, 0x69, 0x68, 0x73, 0x7d, 0xf3, 0x61, 0x73, 0x21, 0x97, 4574 0xaa, 0xa1, 0x18, 0xb0, 0x21, 0x96, 0xae, 0x7d, 0xf3, 0x7d, 0x39, 0xf3, 0xf3, 0x0f, 0xe5, 0xc9, 4575 0xab, 0xae, 0x04, 0x30, 0x23, 0xb7, 0x88, 0x9b, 0x2c, 0x2a, 0xe7, 0x35, 0x62, 0xa9, 0x72, 0x5e, 4576 0x3d, 0x55, 0xaf, 0xfc, 0xfa, 0xe3, 0xdf, 0xdf, 0x65, 0x2f, 0xc1, 0xbc, 0x24, 0xde, 0x09, 0xec, 4577 0xd0, 0xee, 0x22, 0x7f, 0xd7, 0xa8, 0x5b, 0xcf, 0x5f, 0x94, 0x33, 0xbf, 0xbf, 0x28, 0x67, 0xbe, 4578 0x1a, 0x97, 0x8d, 0xe7, 0xe3, 0xb2, 0xf1, 0xdb, 0xb8, 0x6c, 0xfc, 0x39, 0x2e, 0x1b, 0x7b, 0xa6, 4579 0xfc, 0x03, 0xf9, 0xfe, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x76, 0x89, 0xef, 0x57, 0x0b, 4580 0x00, 0x00, 4581} 4582