gitee.com/leisunstar/runtime@v0.0.0-20200521203717-5cef3e7b53f9/protocols/cache/cache.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cache.proto 3 4 /* 5 Package cache is a generated protocol buffer package. 6 7 It is generated from these files: 8 cache.proto 9 10 It has these top-level messages: 11 GrpcVMConfig 12 GrpcVM 13 GrpcStatus 14 GrpcVMStatus 15 */ 16 package cache 17 18 import proto "github.com/gogo/protobuf/proto" 19 import fmt "fmt" 20 import math "math" 21 import google_protobuf "github.com/gogo/protobuf/types" 22 23 import ( 24 context "golang.org/x/net/context" 25 grpc "google.golang.org/grpc" 26 ) 27 28 import io "io" 29 30 // Reference imports to suppress errors if they are not otherwise used. 31 var _ = proto.Marshal 32 var _ = fmt.Errorf 33 var _ = math.Inf 34 35 // This is a compile-time assertion to ensure that this generated file 36 // is compatible with the proto package it is being compiled against. 37 // A compilation error at this line likely means your copy of the 38 // proto package needs to be updated. 39 const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package 40 41 type GrpcVMConfig struct { 42 Data []byte `protobuf:"bytes,1,opt,name=Data,proto3" json:"Data,omitempty"` 43 AgentConfig []byte `protobuf:"bytes,2,opt,name=AgentConfig,proto3" json:"AgentConfig,omitempty"` 44 } 45 46 func (m *GrpcVMConfig) Reset() { *m = GrpcVMConfig{} } 47 func (m *GrpcVMConfig) String() string { return proto.CompactTextString(m) } 48 func (*GrpcVMConfig) ProtoMessage() {} 49 func (*GrpcVMConfig) Descriptor() ([]byte, []int) { return fileDescriptorCache, []int{0} } 50 51 func (m *GrpcVMConfig) GetData() []byte { 52 if m != nil { 53 return m.Data 54 } 55 return nil 56 } 57 58 func (m *GrpcVMConfig) GetAgentConfig() []byte { 59 if m != nil { 60 return m.AgentConfig 61 } 62 return nil 63 } 64 65 type GrpcVM struct { 66 Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` 67 Hypervisor []byte `protobuf:"bytes,2,opt,name=hypervisor,proto3" json:"hypervisor,omitempty"` 68 ProxyPid int64 `protobuf:"varint,3,opt,name=proxyPid,proto3" json:"proxyPid,omitempty"` 69 ProxyURL string `protobuf:"bytes,4,opt,name=proxyURL,proto3" json:"proxyURL,omitempty"` 70 Cpu uint32 `protobuf:"varint,5,opt,name=cpu,proto3" json:"cpu,omitempty"` 71 Memory uint32 `protobuf:"varint,6,opt,name=memory,proto3" json:"memory,omitempty"` 72 CpuDelta uint32 `protobuf:"varint,7,opt,name=cpuDelta,proto3" json:"cpuDelta,omitempty"` 73 } 74 75 func (m *GrpcVM) Reset() { *m = GrpcVM{} } 76 func (m *GrpcVM) String() string { return proto.CompactTextString(m) } 77 func (*GrpcVM) ProtoMessage() {} 78 func (*GrpcVM) Descriptor() ([]byte, []int) { return fileDescriptorCache, []int{1} } 79 80 func (m *GrpcVM) GetId() string { 81 if m != nil { 82 return m.Id 83 } 84 return "" 85 } 86 87 func (m *GrpcVM) GetHypervisor() []byte { 88 if m != nil { 89 return m.Hypervisor 90 } 91 return nil 92 } 93 94 func (m *GrpcVM) GetProxyPid() int64 { 95 if m != nil { 96 return m.ProxyPid 97 } 98 return 0 99 } 100 101 func (m *GrpcVM) GetProxyURL() string { 102 if m != nil { 103 return m.ProxyURL 104 } 105 return "" 106 } 107 108 func (m *GrpcVM) GetCpu() uint32 { 109 if m != nil { 110 return m.Cpu 111 } 112 return 0 113 } 114 115 func (m *GrpcVM) GetMemory() uint32 { 116 if m != nil { 117 return m.Memory 118 } 119 return 0 120 } 121 122 func (m *GrpcVM) GetCpuDelta() uint32 { 123 if m != nil { 124 return m.CpuDelta 125 } 126 return 0 127 } 128 129 type GrpcStatus struct { 130 Pid int64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` 131 Vmstatus []*GrpcVMStatus `protobuf:"bytes,2,rep,name=vmstatus" json:"vmstatus,omitempty"` 132 } 133 134 func (m *GrpcStatus) Reset() { *m = GrpcStatus{} } 135 func (m *GrpcStatus) String() string { return proto.CompactTextString(m) } 136 func (*GrpcStatus) ProtoMessage() {} 137 func (*GrpcStatus) Descriptor() ([]byte, []int) { return fileDescriptorCache, []int{2} } 138 139 func (m *GrpcStatus) GetPid() int64 { 140 if m != nil { 141 return m.Pid 142 } 143 return 0 144 } 145 146 func (m *GrpcStatus) GetVmstatus() []*GrpcVMStatus { 147 if m != nil { 148 return m.Vmstatus 149 } 150 return nil 151 } 152 153 type GrpcVMStatus struct { 154 Pid int64 `protobuf:"varint,1,opt,name=pid,proto3" json:"pid,omitempty"` 155 Cpu uint32 `protobuf:"varint,2,opt,name=cpu,proto3" json:"cpu,omitempty"` 156 Memory uint32 `protobuf:"varint,3,opt,name=memory,proto3" json:"memory,omitempty"` 157 } 158 159 func (m *GrpcVMStatus) Reset() { *m = GrpcVMStatus{} } 160 func (m *GrpcVMStatus) String() string { return proto.CompactTextString(m) } 161 func (*GrpcVMStatus) ProtoMessage() {} 162 func (*GrpcVMStatus) Descriptor() ([]byte, []int) { return fileDescriptorCache, []int{3} } 163 164 func (m *GrpcVMStatus) GetPid() int64 { 165 if m != nil { 166 return m.Pid 167 } 168 return 0 169 } 170 171 func (m *GrpcVMStatus) GetCpu() uint32 { 172 if m != nil { 173 return m.Cpu 174 } 175 return 0 176 } 177 178 func (m *GrpcVMStatus) GetMemory() uint32 { 179 if m != nil { 180 return m.Memory 181 } 182 return 0 183 } 184 185 func init() { 186 proto.RegisterType((*GrpcVMConfig)(nil), "cache.GrpcVMConfig") 187 proto.RegisterType((*GrpcVM)(nil), "cache.GrpcVM") 188 proto.RegisterType((*GrpcStatus)(nil), "cache.GrpcStatus") 189 proto.RegisterType((*GrpcVMStatus)(nil), "cache.GrpcVMStatus") 190 } 191 192 // Reference imports to suppress errors if they are not otherwise used. 193 var _ context.Context 194 var _ grpc.ClientConn 195 196 // This is a compile-time assertion to ensure that this generated file 197 // is compatible with the grpc package it is being compiled against. 198 const _ = grpc.SupportPackageIsVersion4 199 200 // Client API for CacheService service 201 202 type CacheServiceClient interface { 203 Config(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*GrpcVMConfig, error) 204 GetBaseVM(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*GrpcVM, error) 205 Status(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*GrpcStatus, error) 206 Quit(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*google_protobuf.Empty, error) 207 } 208 209 type cacheServiceClient struct { 210 cc *grpc.ClientConn 211 } 212 213 func NewCacheServiceClient(cc *grpc.ClientConn) CacheServiceClient { 214 return &cacheServiceClient{cc} 215 } 216 217 func (c *cacheServiceClient) Config(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*GrpcVMConfig, error) { 218 out := new(GrpcVMConfig) 219 err := grpc.Invoke(ctx, "/cache.CacheService/Config", in, out, c.cc, opts...) 220 if err != nil { 221 return nil, err 222 } 223 return out, nil 224 } 225 226 func (c *cacheServiceClient) GetBaseVM(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*GrpcVM, error) { 227 out := new(GrpcVM) 228 err := grpc.Invoke(ctx, "/cache.CacheService/GetBaseVM", in, out, c.cc, opts...) 229 if err != nil { 230 return nil, err 231 } 232 return out, nil 233 } 234 235 func (c *cacheServiceClient) Status(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*GrpcStatus, error) { 236 out := new(GrpcStatus) 237 err := grpc.Invoke(ctx, "/cache.CacheService/Status", in, out, c.cc, opts...) 238 if err != nil { 239 return nil, err 240 } 241 return out, nil 242 } 243 244 func (c *cacheServiceClient) Quit(ctx context.Context, in *google_protobuf.Empty, opts ...grpc.CallOption) (*google_protobuf.Empty, error) { 245 out := new(google_protobuf.Empty) 246 err := grpc.Invoke(ctx, "/cache.CacheService/Quit", in, out, c.cc, opts...) 247 if err != nil { 248 return nil, err 249 } 250 return out, nil 251 } 252 253 // Server API for CacheService service 254 255 type CacheServiceServer interface { 256 Config(context.Context, *google_protobuf.Empty) (*GrpcVMConfig, error) 257 GetBaseVM(context.Context, *google_protobuf.Empty) (*GrpcVM, error) 258 Status(context.Context, *google_protobuf.Empty) (*GrpcStatus, error) 259 Quit(context.Context, *google_protobuf.Empty) (*google_protobuf.Empty, error) 260 } 261 262 func RegisterCacheServiceServer(s *grpc.Server, srv CacheServiceServer) { 263 s.RegisterService(&_CacheService_serviceDesc, srv) 264 } 265 266 func _CacheService_Config_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 267 in := new(google_protobuf.Empty) 268 if err := dec(in); err != nil { 269 return nil, err 270 } 271 if interceptor == nil { 272 return srv.(CacheServiceServer).Config(ctx, in) 273 } 274 info := &grpc.UnaryServerInfo{ 275 Server: srv, 276 FullMethod: "/cache.CacheService/Config", 277 } 278 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 279 return srv.(CacheServiceServer).Config(ctx, req.(*google_protobuf.Empty)) 280 } 281 return interceptor(ctx, in, info, handler) 282 } 283 284 func _CacheService_GetBaseVM_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 285 in := new(google_protobuf.Empty) 286 if err := dec(in); err != nil { 287 return nil, err 288 } 289 if interceptor == nil { 290 return srv.(CacheServiceServer).GetBaseVM(ctx, in) 291 } 292 info := &grpc.UnaryServerInfo{ 293 Server: srv, 294 FullMethod: "/cache.CacheService/GetBaseVM", 295 } 296 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 297 return srv.(CacheServiceServer).GetBaseVM(ctx, req.(*google_protobuf.Empty)) 298 } 299 return interceptor(ctx, in, info, handler) 300 } 301 302 func _CacheService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 303 in := new(google_protobuf.Empty) 304 if err := dec(in); err != nil { 305 return nil, err 306 } 307 if interceptor == nil { 308 return srv.(CacheServiceServer).Status(ctx, in) 309 } 310 info := &grpc.UnaryServerInfo{ 311 Server: srv, 312 FullMethod: "/cache.CacheService/Status", 313 } 314 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 315 return srv.(CacheServiceServer).Status(ctx, req.(*google_protobuf.Empty)) 316 } 317 return interceptor(ctx, in, info, handler) 318 } 319 320 func _CacheService_Quit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 321 in := new(google_protobuf.Empty) 322 if err := dec(in); err != nil { 323 return nil, err 324 } 325 if interceptor == nil { 326 return srv.(CacheServiceServer).Quit(ctx, in) 327 } 328 info := &grpc.UnaryServerInfo{ 329 Server: srv, 330 FullMethod: "/cache.CacheService/Quit", 331 } 332 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 333 return srv.(CacheServiceServer).Quit(ctx, req.(*google_protobuf.Empty)) 334 } 335 return interceptor(ctx, in, info, handler) 336 } 337 338 var _CacheService_serviceDesc = grpc.ServiceDesc{ 339 ServiceName: "cache.CacheService", 340 HandlerType: (*CacheServiceServer)(nil), 341 Methods: []grpc.MethodDesc{ 342 { 343 MethodName: "Config", 344 Handler: _CacheService_Config_Handler, 345 }, 346 { 347 MethodName: "GetBaseVM", 348 Handler: _CacheService_GetBaseVM_Handler, 349 }, 350 { 351 MethodName: "Status", 352 Handler: _CacheService_Status_Handler, 353 }, 354 { 355 MethodName: "Quit", 356 Handler: _CacheService_Quit_Handler, 357 }, 358 }, 359 Streams: []grpc.StreamDesc{}, 360 Metadata: "cache.proto", 361 } 362 363 func (m *GrpcVMConfig) Marshal() (dAtA []byte, err error) { 364 size := m.Size() 365 dAtA = make([]byte, size) 366 n, err := m.MarshalTo(dAtA) 367 if err != nil { 368 return nil, err 369 } 370 return dAtA[:n], nil 371 } 372 373 func (m *GrpcVMConfig) MarshalTo(dAtA []byte) (int, error) { 374 var i int 375 _ = i 376 var l int 377 _ = l 378 if len(m.Data) > 0 { 379 dAtA[i] = 0xa 380 i++ 381 i = encodeVarintCache(dAtA, i, uint64(len(m.Data))) 382 i += copy(dAtA[i:], m.Data) 383 } 384 if len(m.AgentConfig) > 0 { 385 dAtA[i] = 0x12 386 i++ 387 i = encodeVarintCache(dAtA, i, uint64(len(m.AgentConfig))) 388 i += copy(dAtA[i:], m.AgentConfig) 389 } 390 return i, nil 391 } 392 393 func (m *GrpcVM) Marshal() (dAtA []byte, err error) { 394 size := m.Size() 395 dAtA = make([]byte, size) 396 n, err := m.MarshalTo(dAtA) 397 if err != nil { 398 return nil, err 399 } 400 return dAtA[:n], nil 401 } 402 403 func (m *GrpcVM) MarshalTo(dAtA []byte) (int, error) { 404 var i int 405 _ = i 406 var l int 407 _ = l 408 if len(m.Id) > 0 { 409 dAtA[i] = 0xa 410 i++ 411 i = encodeVarintCache(dAtA, i, uint64(len(m.Id))) 412 i += copy(dAtA[i:], m.Id) 413 } 414 if len(m.Hypervisor) > 0 { 415 dAtA[i] = 0x12 416 i++ 417 i = encodeVarintCache(dAtA, i, uint64(len(m.Hypervisor))) 418 i += copy(dAtA[i:], m.Hypervisor) 419 } 420 if m.ProxyPid != 0 { 421 dAtA[i] = 0x18 422 i++ 423 i = encodeVarintCache(dAtA, i, uint64(m.ProxyPid)) 424 } 425 if len(m.ProxyURL) > 0 { 426 dAtA[i] = 0x22 427 i++ 428 i = encodeVarintCache(dAtA, i, uint64(len(m.ProxyURL))) 429 i += copy(dAtA[i:], m.ProxyURL) 430 } 431 if m.Cpu != 0 { 432 dAtA[i] = 0x28 433 i++ 434 i = encodeVarintCache(dAtA, i, uint64(m.Cpu)) 435 } 436 if m.Memory != 0 { 437 dAtA[i] = 0x30 438 i++ 439 i = encodeVarintCache(dAtA, i, uint64(m.Memory)) 440 } 441 if m.CpuDelta != 0 { 442 dAtA[i] = 0x38 443 i++ 444 i = encodeVarintCache(dAtA, i, uint64(m.CpuDelta)) 445 } 446 return i, nil 447 } 448 449 func (m *GrpcStatus) Marshal() (dAtA []byte, err error) { 450 size := m.Size() 451 dAtA = make([]byte, size) 452 n, err := m.MarshalTo(dAtA) 453 if err != nil { 454 return nil, err 455 } 456 return dAtA[:n], nil 457 } 458 459 func (m *GrpcStatus) MarshalTo(dAtA []byte) (int, error) { 460 var i int 461 _ = i 462 var l int 463 _ = l 464 if m.Pid != 0 { 465 dAtA[i] = 0x8 466 i++ 467 i = encodeVarintCache(dAtA, i, uint64(m.Pid)) 468 } 469 if len(m.Vmstatus) > 0 { 470 for _, msg := range m.Vmstatus { 471 dAtA[i] = 0x12 472 i++ 473 i = encodeVarintCache(dAtA, i, uint64(msg.Size())) 474 n, err := msg.MarshalTo(dAtA[i:]) 475 if err != nil { 476 return 0, err 477 } 478 i += n 479 } 480 } 481 return i, nil 482 } 483 484 func (m *GrpcVMStatus) Marshal() (dAtA []byte, err error) { 485 size := m.Size() 486 dAtA = make([]byte, size) 487 n, err := m.MarshalTo(dAtA) 488 if err != nil { 489 return nil, err 490 } 491 return dAtA[:n], nil 492 } 493 494 func (m *GrpcVMStatus) MarshalTo(dAtA []byte) (int, error) { 495 var i int 496 _ = i 497 var l int 498 _ = l 499 if m.Pid != 0 { 500 dAtA[i] = 0x8 501 i++ 502 i = encodeVarintCache(dAtA, i, uint64(m.Pid)) 503 } 504 if m.Cpu != 0 { 505 dAtA[i] = 0x10 506 i++ 507 i = encodeVarintCache(dAtA, i, uint64(m.Cpu)) 508 } 509 if m.Memory != 0 { 510 dAtA[i] = 0x18 511 i++ 512 i = encodeVarintCache(dAtA, i, uint64(m.Memory)) 513 } 514 return i, nil 515 } 516 517 func encodeVarintCache(dAtA []byte, offset int, v uint64) int { 518 for v >= 1<<7 { 519 dAtA[offset] = uint8(v&0x7f | 0x80) 520 v >>= 7 521 offset++ 522 } 523 dAtA[offset] = uint8(v) 524 return offset + 1 525 } 526 func (m *GrpcVMConfig) Size() (n int) { 527 var l int 528 _ = l 529 l = len(m.Data) 530 if l > 0 { 531 n += 1 + l + sovCache(uint64(l)) 532 } 533 l = len(m.AgentConfig) 534 if l > 0 { 535 n += 1 + l + sovCache(uint64(l)) 536 } 537 return n 538 } 539 540 func (m *GrpcVM) Size() (n int) { 541 var l int 542 _ = l 543 l = len(m.Id) 544 if l > 0 { 545 n += 1 + l + sovCache(uint64(l)) 546 } 547 l = len(m.Hypervisor) 548 if l > 0 { 549 n += 1 + l + sovCache(uint64(l)) 550 } 551 if m.ProxyPid != 0 { 552 n += 1 + sovCache(uint64(m.ProxyPid)) 553 } 554 l = len(m.ProxyURL) 555 if l > 0 { 556 n += 1 + l + sovCache(uint64(l)) 557 } 558 if m.Cpu != 0 { 559 n += 1 + sovCache(uint64(m.Cpu)) 560 } 561 if m.Memory != 0 { 562 n += 1 + sovCache(uint64(m.Memory)) 563 } 564 if m.CpuDelta != 0 { 565 n += 1 + sovCache(uint64(m.CpuDelta)) 566 } 567 return n 568 } 569 570 func (m *GrpcStatus) Size() (n int) { 571 var l int 572 _ = l 573 if m.Pid != 0 { 574 n += 1 + sovCache(uint64(m.Pid)) 575 } 576 if len(m.Vmstatus) > 0 { 577 for _, e := range m.Vmstatus { 578 l = e.Size() 579 n += 1 + l + sovCache(uint64(l)) 580 } 581 } 582 return n 583 } 584 585 func (m *GrpcVMStatus) Size() (n int) { 586 var l int 587 _ = l 588 if m.Pid != 0 { 589 n += 1 + sovCache(uint64(m.Pid)) 590 } 591 if m.Cpu != 0 { 592 n += 1 + sovCache(uint64(m.Cpu)) 593 } 594 if m.Memory != 0 { 595 n += 1 + sovCache(uint64(m.Memory)) 596 } 597 return n 598 } 599 600 func sovCache(x uint64) (n int) { 601 for { 602 n++ 603 x >>= 7 604 if x == 0 { 605 break 606 } 607 } 608 return n 609 } 610 func sozCache(x uint64) (n int) { 611 return sovCache(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 612 } 613 func (m *GrpcVMConfig) Unmarshal(dAtA []byte) error { 614 l := len(dAtA) 615 iNdEx := 0 616 for iNdEx < l { 617 preIndex := iNdEx 618 var wire uint64 619 for shift := uint(0); ; shift += 7 { 620 if shift >= 64 { 621 return ErrIntOverflowCache 622 } 623 if iNdEx >= l { 624 return io.ErrUnexpectedEOF 625 } 626 b := dAtA[iNdEx] 627 iNdEx++ 628 wire |= (uint64(b) & 0x7F) << shift 629 if b < 0x80 { 630 break 631 } 632 } 633 fieldNum := int32(wire >> 3) 634 wireType := int(wire & 0x7) 635 if wireType == 4 { 636 return fmt.Errorf("proto: GrpcVMConfig: wiretype end group for non-group") 637 } 638 if fieldNum <= 0 { 639 return fmt.Errorf("proto: GrpcVMConfig: illegal tag %d (wire type %d)", fieldNum, wire) 640 } 641 switch fieldNum { 642 case 1: 643 if wireType != 2 { 644 return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) 645 } 646 var byteLen int 647 for shift := uint(0); ; shift += 7 { 648 if shift >= 64 { 649 return ErrIntOverflowCache 650 } 651 if iNdEx >= l { 652 return io.ErrUnexpectedEOF 653 } 654 b := dAtA[iNdEx] 655 iNdEx++ 656 byteLen |= (int(b) & 0x7F) << shift 657 if b < 0x80 { 658 break 659 } 660 } 661 if byteLen < 0 { 662 return ErrInvalidLengthCache 663 } 664 postIndex := iNdEx + byteLen 665 if postIndex > l { 666 return io.ErrUnexpectedEOF 667 } 668 m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) 669 if m.Data == nil { 670 m.Data = []byte{} 671 } 672 iNdEx = postIndex 673 case 2: 674 if wireType != 2 { 675 return fmt.Errorf("proto: wrong wireType = %d for field AgentConfig", wireType) 676 } 677 var byteLen int 678 for shift := uint(0); ; shift += 7 { 679 if shift >= 64 { 680 return ErrIntOverflowCache 681 } 682 if iNdEx >= l { 683 return io.ErrUnexpectedEOF 684 } 685 b := dAtA[iNdEx] 686 iNdEx++ 687 byteLen |= (int(b) & 0x7F) << shift 688 if b < 0x80 { 689 break 690 } 691 } 692 if byteLen < 0 { 693 return ErrInvalidLengthCache 694 } 695 postIndex := iNdEx + byteLen 696 if postIndex > l { 697 return io.ErrUnexpectedEOF 698 } 699 m.AgentConfig = append(m.AgentConfig[:0], dAtA[iNdEx:postIndex]...) 700 if m.AgentConfig == nil { 701 m.AgentConfig = []byte{} 702 } 703 iNdEx = postIndex 704 default: 705 iNdEx = preIndex 706 skippy, err := skipCache(dAtA[iNdEx:]) 707 if err != nil { 708 return err 709 } 710 if skippy < 0 { 711 return ErrInvalidLengthCache 712 } 713 if (iNdEx + skippy) > l { 714 return io.ErrUnexpectedEOF 715 } 716 iNdEx += skippy 717 } 718 } 719 720 if iNdEx > l { 721 return io.ErrUnexpectedEOF 722 } 723 return nil 724 } 725 func (m *GrpcVM) Unmarshal(dAtA []byte) error { 726 l := len(dAtA) 727 iNdEx := 0 728 for iNdEx < l { 729 preIndex := iNdEx 730 var wire uint64 731 for shift := uint(0); ; shift += 7 { 732 if shift >= 64 { 733 return ErrIntOverflowCache 734 } 735 if iNdEx >= l { 736 return io.ErrUnexpectedEOF 737 } 738 b := dAtA[iNdEx] 739 iNdEx++ 740 wire |= (uint64(b) & 0x7F) << shift 741 if b < 0x80 { 742 break 743 } 744 } 745 fieldNum := int32(wire >> 3) 746 wireType := int(wire & 0x7) 747 if wireType == 4 { 748 return fmt.Errorf("proto: GrpcVM: wiretype end group for non-group") 749 } 750 if fieldNum <= 0 { 751 return fmt.Errorf("proto: GrpcVM: illegal tag %d (wire type %d)", fieldNum, wire) 752 } 753 switch fieldNum { 754 case 1: 755 if wireType != 2 { 756 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 757 } 758 var stringLen uint64 759 for shift := uint(0); ; shift += 7 { 760 if shift >= 64 { 761 return ErrIntOverflowCache 762 } 763 if iNdEx >= l { 764 return io.ErrUnexpectedEOF 765 } 766 b := dAtA[iNdEx] 767 iNdEx++ 768 stringLen |= (uint64(b) & 0x7F) << shift 769 if b < 0x80 { 770 break 771 } 772 } 773 intStringLen := int(stringLen) 774 if intStringLen < 0 { 775 return ErrInvalidLengthCache 776 } 777 postIndex := iNdEx + intStringLen 778 if postIndex > l { 779 return io.ErrUnexpectedEOF 780 } 781 m.Id = string(dAtA[iNdEx:postIndex]) 782 iNdEx = postIndex 783 case 2: 784 if wireType != 2 { 785 return fmt.Errorf("proto: wrong wireType = %d for field Hypervisor", wireType) 786 } 787 var byteLen int 788 for shift := uint(0); ; shift += 7 { 789 if shift >= 64 { 790 return ErrIntOverflowCache 791 } 792 if iNdEx >= l { 793 return io.ErrUnexpectedEOF 794 } 795 b := dAtA[iNdEx] 796 iNdEx++ 797 byteLen |= (int(b) & 0x7F) << shift 798 if b < 0x80 { 799 break 800 } 801 } 802 if byteLen < 0 { 803 return ErrInvalidLengthCache 804 } 805 postIndex := iNdEx + byteLen 806 if postIndex > l { 807 return io.ErrUnexpectedEOF 808 } 809 m.Hypervisor = append(m.Hypervisor[:0], dAtA[iNdEx:postIndex]...) 810 if m.Hypervisor == nil { 811 m.Hypervisor = []byte{} 812 } 813 iNdEx = postIndex 814 case 3: 815 if wireType != 0 { 816 return fmt.Errorf("proto: wrong wireType = %d for field ProxyPid", wireType) 817 } 818 m.ProxyPid = 0 819 for shift := uint(0); ; shift += 7 { 820 if shift >= 64 { 821 return ErrIntOverflowCache 822 } 823 if iNdEx >= l { 824 return io.ErrUnexpectedEOF 825 } 826 b := dAtA[iNdEx] 827 iNdEx++ 828 m.ProxyPid |= (int64(b) & 0x7F) << shift 829 if b < 0x80 { 830 break 831 } 832 } 833 case 4: 834 if wireType != 2 { 835 return fmt.Errorf("proto: wrong wireType = %d for field ProxyURL", wireType) 836 } 837 var stringLen uint64 838 for shift := uint(0); ; shift += 7 { 839 if shift >= 64 { 840 return ErrIntOverflowCache 841 } 842 if iNdEx >= l { 843 return io.ErrUnexpectedEOF 844 } 845 b := dAtA[iNdEx] 846 iNdEx++ 847 stringLen |= (uint64(b) & 0x7F) << shift 848 if b < 0x80 { 849 break 850 } 851 } 852 intStringLen := int(stringLen) 853 if intStringLen < 0 { 854 return ErrInvalidLengthCache 855 } 856 postIndex := iNdEx + intStringLen 857 if postIndex > l { 858 return io.ErrUnexpectedEOF 859 } 860 m.ProxyURL = string(dAtA[iNdEx:postIndex]) 861 iNdEx = postIndex 862 case 5: 863 if wireType != 0 { 864 return fmt.Errorf("proto: wrong wireType = %d for field Cpu", wireType) 865 } 866 m.Cpu = 0 867 for shift := uint(0); ; shift += 7 { 868 if shift >= 64 { 869 return ErrIntOverflowCache 870 } 871 if iNdEx >= l { 872 return io.ErrUnexpectedEOF 873 } 874 b := dAtA[iNdEx] 875 iNdEx++ 876 m.Cpu |= (uint32(b) & 0x7F) << shift 877 if b < 0x80 { 878 break 879 } 880 } 881 case 6: 882 if wireType != 0 { 883 return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) 884 } 885 m.Memory = 0 886 for shift := uint(0); ; shift += 7 { 887 if shift >= 64 { 888 return ErrIntOverflowCache 889 } 890 if iNdEx >= l { 891 return io.ErrUnexpectedEOF 892 } 893 b := dAtA[iNdEx] 894 iNdEx++ 895 m.Memory |= (uint32(b) & 0x7F) << shift 896 if b < 0x80 { 897 break 898 } 899 } 900 case 7: 901 if wireType != 0 { 902 return fmt.Errorf("proto: wrong wireType = %d for field CpuDelta", wireType) 903 } 904 m.CpuDelta = 0 905 for shift := uint(0); ; shift += 7 { 906 if shift >= 64 { 907 return ErrIntOverflowCache 908 } 909 if iNdEx >= l { 910 return io.ErrUnexpectedEOF 911 } 912 b := dAtA[iNdEx] 913 iNdEx++ 914 m.CpuDelta |= (uint32(b) & 0x7F) << shift 915 if b < 0x80 { 916 break 917 } 918 } 919 default: 920 iNdEx = preIndex 921 skippy, err := skipCache(dAtA[iNdEx:]) 922 if err != nil { 923 return err 924 } 925 if skippy < 0 { 926 return ErrInvalidLengthCache 927 } 928 if (iNdEx + skippy) > l { 929 return io.ErrUnexpectedEOF 930 } 931 iNdEx += skippy 932 } 933 } 934 935 if iNdEx > l { 936 return io.ErrUnexpectedEOF 937 } 938 return nil 939 } 940 func (m *GrpcStatus) Unmarshal(dAtA []byte) error { 941 l := len(dAtA) 942 iNdEx := 0 943 for iNdEx < l { 944 preIndex := iNdEx 945 var wire uint64 946 for shift := uint(0); ; shift += 7 { 947 if shift >= 64 { 948 return ErrIntOverflowCache 949 } 950 if iNdEx >= l { 951 return io.ErrUnexpectedEOF 952 } 953 b := dAtA[iNdEx] 954 iNdEx++ 955 wire |= (uint64(b) & 0x7F) << shift 956 if b < 0x80 { 957 break 958 } 959 } 960 fieldNum := int32(wire >> 3) 961 wireType := int(wire & 0x7) 962 if wireType == 4 { 963 return fmt.Errorf("proto: GrpcStatus: wiretype end group for non-group") 964 } 965 if fieldNum <= 0 { 966 return fmt.Errorf("proto: GrpcStatus: illegal tag %d (wire type %d)", fieldNum, wire) 967 } 968 switch fieldNum { 969 case 1: 970 if wireType != 0 { 971 return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) 972 } 973 m.Pid = 0 974 for shift := uint(0); ; shift += 7 { 975 if shift >= 64 { 976 return ErrIntOverflowCache 977 } 978 if iNdEx >= l { 979 return io.ErrUnexpectedEOF 980 } 981 b := dAtA[iNdEx] 982 iNdEx++ 983 m.Pid |= (int64(b) & 0x7F) << shift 984 if b < 0x80 { 985 break 986 } 987 } 988 case 2: 989 if wireType != 2 { 990 return fmt.Errorf("proto: wrong wireType = %d for field Vmstatus", wireType) 991 } 992 var msglen int 993 for shift := uint(0); ; shift += 7 { 994 if shift >= 64 { 995 return ErrIntOverflowCache 996 } 997 if iNdEx >= l { 998 return io.ErrUnexpectedEOF 999 } 1000 b := dAtA[iNdEx] 1001 iNdEx++ 1002 msglen |= (int(b) & 0x7F) << shift 1003 if b < 0x80 { 1004 break 1005 } 1006 } 1007 if msglen < 0 { 1008 return ErrInvalidLengthCache 1009 } 1010 postIndex := iNdEx + msglen 1011 if postIndex > l { 1012 return io.ErrUnexpectedEOF 1013 } 1014 m.Vmstatus = append(m.Vmstatus, &GrpcVMStatus{}) 1015 if err := m.Vmstatus[len(m.Vmstatus)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1016 return err 1017 } 1018 iNdEx = postIndex 1019 default: 1020 iNdEx = preIndex 1021 skippy, err := skipCache(dAtA[iNdEx:]) 1022 if err != nil { 1023 return err 1024 } 1025 if skippy < 0 { 1026 return ErrInvalidLengthCache 1027 } 1028 if (iNdEx + skippy) > l { 1029 return io.ErrUnexpectedEOF 1030 } 1031 iNdEx += skippy 1032 } 1033 } 1034 1035 if iNdEx > l { 1036 return io.ErrUnexpectedEOF 1037 } 1038 return nil 1039 } 1040 func (m *GrpcVMStatus) Unmarshal(dAtA []byte) error { 1041 l := len(dAtA) 1042 iNdEx := 0 1043 for iNdEx < l { 1044 preIndex := iNdEx 1045 var wire uint64 1046 for shift := uint(0); ; shift += 7 { 1047 if shift >= 64 { 1048 return ErrIntOverflowCache 1049 } 1050 if iNdEx >= l { 1051 return io.ErrUnexpectedEOF 1052 } 1053 b := dAtA[iNdEx] 1054 iNdEx++ 1055 wire |= (uint64(b) & 0x7F) << shift 1056 if b < 0x80 { 1057 break 1058 } 1059 } 1060 fieldNum := int32(wire >> 3) 1061 wireType := int(wire & 0x7) 1062 if wireType == 4 { 1063 return fmt.Errorf("proto: GrpcVMStatus: wiretype end group for non-group") 1064 } 1065 if fieldNum <= 0 { 1066 return fmt.Errorf("proto: GrpcVMStatus: illegal tag %d (wire type %d)", fieldNum, wire) 1067 } 1068 switch fieldNum { 1069 case 1: 1070 if wireType != 0 { 1071 return fmt.Errorf("proto: wrong wireType = %d for field Pid", wireType) 1072 } 1073 m.Pid = 0 1074 for shift := uint(0); ; shift += 7 { 1075 if shift >= 64 { 1076 return ErrIntOverflowCache 1077 } 1078 if iNdEx >= l { 1079 return io.ErrUnexpectedEOF 1080 } 1081 b := dAtA[iNdEx] 1082 iNdEx++ 1083 m.Pid |= (int64(b) & 0x7F) << shift 1084 if b < 0x80 { 1085 break 1086 } 1087 } 1088 case 2: 1089 if wireType != 0 { 1090 return fmt.Errorf("proto: wrong wireType = %d for field Cpu", wireType) 1091 } 1092 m.Cpu = 0 1093 for shift := uint(0); ; shift += 7 { 1094 if shift >= 64 { 1095 return ErrIntOverflowCache 1096 } 1097 if iNdEx >= l { 1098 return io.ErrUnexpectedEOF 1099 } 1100 b := dAtA[iNdEx] 1101 iNdEx++ 1102 m.Cpu |= (uint32(b) & 0x7F) << shift 1103 if b < 0x80 { 1104 break 1105 } 1106 } 1107 case 3: 1108 if wireType != 0 { 1109 return fmt.Errorf("proto: wrong wireType = %d for field Memory", wireType) 1110 } 1111 m.Memory = 0 1112 for shift := uint(0); ; shift += 7 { 1113 if shift >= 64 { 1114 return ErrIntOverflowCache 1115 } 1116 if iNdEx >= l { 1117 return io.ErrUnexpectedEOF 1118 } 1119 b := dAtA[iNdEx] 1120 iNdEx++ 1121 m.Memory |= (uint32(b) & 0x7F) << shift 1122 if b < 0x80 { 1123 break 1124 } 1125 } 1126 default: 1127 iNdEx = preIndex 1128 skippy, err := skipCache(dAtA[iNdEx:]) 1129 if err != nil { 1130 return err 1131 } 1132 if skippy < 0 { 1133 return ErrInvalidLengthCache 1134 } 1135 if (iNdEx + skippy) > l { 1136 return io.ErrUnexpectedEOF 1137 } 1138 iNdEx += skippy 1139 } 1140 } 1141 1142 if iNdEx > l { 1143 return io.ErrUnexpectedEOF 1144 } 1145 return nil 1146 } 1147 func skipCache(dAtA []byte) (n int, err error) { 1148 l := len(dAtA) 1149 iNdEx := 0 1150 for iNdEx < l { 1151 var wire uint64 1152 for shift := uint(0); ; shift += 7 { 1153 if shift >= 64 { 1154 return 0, ErrIntOverflowCache 1155 } 1156 if iNdEx >= l { 1157 return 0, io.ErrUnexpectedEOF 1158 } 1159 b := dAtA[iNdEx] 1160 iNdEx++ 1161 wire |= (uint64(b) & 0x7F) << shift 1162 if b < 0x80 { 1163 break 1164 } 1165 } 1166 wireType := int(wire & 0x7) 1167 switch wireType { 1168 case 0: 1169 for shift := uint(0); ; shift += 7 { 1170 if shift >= 64 { 1171 return 0, ErrIntOverflowCache 1172 } 1173 if iNdEx >= l { 1174 return 0, io.ErrUnexpectedEOF 1175 } 1176 iNdEx++ 1177 if dAtA[iNdEx-1] < 0x80 { 1178 break 1179 } 1180 } 1181 return iNdEx, nil 1182 case 1: 1183 iNdEx += 8 1184 return iNdEx, nil 1185 case 2: 1186 var length int 1187 for shift := uint(0); ; shift += 7 { 1188 if shift >= 64 { 1189 return 0, ErrIntOverflowCache 1190 } 1191 if iNdEx >= l { 1192 return 0, io.ErrUnexpectedEOF 1193 } 1194 b := dAtA[iNdEx] 1195 iNdEx++ 1196 length |= (int(b) & 0x7F) << shift 1197 if b < 0x80 { 1198 break 1199 } 1200 } 1201 iNdEx += length 1202 if length < 0 { 1203 return 0, ErrInvalidLengthCache 1204 } 1205 return iNdEx, nil 1206 case 3: 1207 for { 1208 var innerWire uint64 1209 var start int = iNdEx 1210 for shift := uint(0); ; shift += 7 { 1211 if shift >= 64 { 1212 return 0, ErrIntOverflowCache 1213 } 1214 if iNdEx >= l { 1215 return 0, io.ErrUnexpectedEOF 1216 } 1217 b := dAtA[iNdEx] 1218 iNdEx++ 1219 innerWire |= (uint64(b) & 0x7F) << shift 1220 if b < 0x80 { 1221 break 1222 } 1223 } 1224 innerWireType := int(innerWire & 0x7) 1225 if innerWireType == 4 { 1226 break 1227 } 1228 next, err := skipCache(dAtA[start:]) 1229 if err != nil { 1230 return 0, err 1231 } 1232 iNdEx = start + next 1233 } 1234 return iNdEx, nil 1235 case 4: 1236 return iNdEx, nil 1237 case 5: 1238 iNdEx += 4 1239 return iNdEx, nil 1240 default: 1241 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1242 } 1243 } 1244 panic("unreachable") 1245 } 1246 1247 var ( 1248 ErrInvalidLengthCache = fmt.Errorf("proto: negative length found during unmarshaling") 1249 ErrIntOverflowCache = fmt.Errorf("proto: integer overflow") 1250 ) 1251 1252 func init() { proto.RegisterFile("cache.proto", fileDescriptorCache) } 1253 1254 var fileDescriptorCache = []byte{ 1255 // 374 bytes of a gzipped FileDescriptorProto 1256 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x51, 0xcd, 0x0a, 0xda, 0x40, 1257 0x10, 0x66, 0x13, 0x4d, 0x75, 0x8c, 0xa5, 0xdd, 0x82, 0x2c, 0x16, 0x42, 0xc8, 0x29, 0xa7, 0x08, 1258 0x4a, 0x7b, 0xaf, 0x5a, 0x84, 0x52, 0x69, 0x1b, 0xa9, 0xf7, 0x18, 0xd7, 0x18, 0x30, 0xee, 0x92, 1259 0x6c, 0xa4, 0x79, 0xb1, 0x3e, 0x43, 0x8f, 0x7d, 0x84, 0xe2, 0xa1, 0xcf, 0x51, 0x76, 0xb3, 0x86, 1260 0x08, 0xcd, 0x6d, 0x66, 0xbe, 0x9f, 0xfd, 0x76, 0x06, 0x46, 0x71, 0x14, 0x9f, 0x69, 0xc0, 0x73, 1261 0x26, 0x18, 0xee, 0xab, 0x66, 0xfa, 0x36, 0x61, 0x2c, 0xb9, 0xd0, 0x99, 0x1a, 0x1e, 0xca, 0xd3, 1262 0x8c, 0x66, 0x5c, 0x54, 0x35, 0xc7, 0x5b, 0x83, 0xbd, 0xc9, 0x79, 0xbc, 0xdf, 0xae, 0xd8, 0xf5, 1263 0x94, 0x26, 0x18, 0x43, 0x6f, 0x1d, 0x89, 0x88, 0x20, 0x17, 0xf9, 0x76, 0xa8, 0x6a, 0xec, 0xc2, 1264 0xe8, 0x43, 0x42, 0xaf, 0xa2, 0xa6, 0x10, 0x43, 0x41, 0xed, 0x91, 0xf7, 0x13, 0x81, 0x55, 0xdb, 1265 0xe0, 0x97, 0x60, 0xa4, 0x47, 0x25, 0x1f, 0x86, 0x46, 0x7a, 0xc4, 0x0e, 0xc0, 0xb9, 0xe2, 0x34, 1266 0xbf, 0xa5, 0x05, 0xcb, 0xb5, 0xb6, 0x35, 0xc1, 0x53, 0x18, 0xf0, 0x9c, 0xfd, 0xa8, 0xbe, 0xa6, 1267 0x47, 0x62, 0xba, 0xc8, 0x37, 0xc3, 0xa6, 0x6f, 0xb0, 0xef, 0xe1, 0x67, 0xd2, 0x53, 0x8e, 0x4d, 1268 0x8f, 0x5f, 0x81, 0x19, 0xf3, 0x92, 0xf4, 0x5d, 0xe4, 0x8f, 0x43, 0x59, 0xe2, 0x09, 0x58, 0x19, 1269 0xcd, 0x58, 0x5e, 0x11, 0x4b, 0x0d, 0x75, 0x27, 0x5d, 0x62, 0x5e, 0xae, 0xe9, 0x45, 0x44, 0xe4, 1270 0x85, 0x42, 0x9a, 0xde, 0xfb, 0x02, 0x20, 0x73, 0xef, 0x44, 0x24, 0xca, 0x42, 0x7a, 0x72, 0x1d, 1271 0xde, 0x0c, 0x65, 0x89, 0x67, 0x30, 0xb8, 0x65, 0x85, 0x42, 0x89, 0xe1, 0x9a, 0xfe, 0x68, 0xfe, 1272 0x26, 0xa8, 0x57, 0x5c, 0x7f, 0xb7, 0x16, 0x86, 0x0d, 0xc9, 0xfb, 0xf4, 0xd8, 0x67, 0xa7, 0xa5, 1273 0x0e, 0x6e, 0xfc, 0x2f, 0xb8, 0xd9, 0x0e, 0x3e, 0xff, 0x8b, 0xc0, 0x5e, 0xc9, 0xc7, 0x76, 0x72, 1274 0x59, 0x31, 0xc5, 0xef, 0xc0, 0xd2, 0x67, 0x9a, 0x04, 0xf5, 0x51, 0x83, 0xc7, 0x51, 0x83, 0x8f, 1275 0xf2, 0xa8, 0xd3, 0xe7, 0x74, 0x9a, 0x3c, 0x87, 0xe1, 0x86, 0x8a, 0x65, 0x54, 0xd0, 0xfd, 0xb6, 1276 0x53, 0x39, 0x7e, 0x52, 0xe2, 0x05, 0x58, 0xfa, 0x07, 0x5d, 0x82, 0xd7, 0x2d, 0x81, 0xa6, 0xbe, 1277 0x87, 0xde, 0xb7, 0x32, 0x15, 0x9d, 0x92, 0x8e, 0xf9, 0xd2, 0xfe, 0x75, 0x77, 0xd0, 0xef, 0xbb, 1278 0x83, 0xfe, 0xdc, 0x1d, 0x74, 0xb0, 0x14, 0xba, 0xf8, 0x17, 0x00, 0x00, 0xff, 0xff, 0x40, 0x5e, 1279 0x19, 0x6e, 0xcc, 0x02, 0x00, 0x00, 1280 }