github.com/onosproject/onos-api/go@v0.10.32/onos/misc/misc.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: onos/misc/misc.proto 3 4 package misc 5 6 import ( 7 fmt "fmt" 8 proto "github.com/gogo/protobuf/proto" 9 io "io" 10 math "math" 11 math_bits "math/bits" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 24 25 // GridPosition indicates where on a grid an entity should be located; used for visualization purposes 26 type GridPosition struct { 27 X int32 `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"` 28 Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"` 29 } 30 31 func (m *GridPosition) Reset() { *m = GridPosition{} } 32 func (m *GridPosition) String() string { return proto.CompactTextString(m) } 33 func (*GridPosition) ProtoMessage() {} 34 func (*GridPosition) Descriptor() ([]byte, []int) { 35 return fileDescriptor_ea61f6686f6b957c, []int{0} 36 } 37 func (m *GridPosition) XXX_Unmarshal(b []byte) error { 38 return m.Unmarshal(b) 39 } 40 func (m *GridPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 41 if deterministic { 42 return xxx_messageInfo_GridPosition.Marshal(b, m, deterministic) 43 } else { 44 b = b[:cap(b)] 45 n, err := m.MarshalToSizedBuffer(b) 46 if err != nil { 47 return nil, err 48 } 49 return b[:n], nil 50 } 51 } 52 func (m *GridPosition) XXX_Merge(src proto.Message) { 53 xxx_messageInfo_GridPosition.Merge(m, src) 54 } 55 func (m *GridPosition) XXX_Size() int { 56 return m.Size() 57 } 58 func (m *GridPosition) XXX_DiscardUnknown() { 59 xxx_messageInfo_GridPosition.DiscardUnknown(m) 60 } 61 62 var xxx_messageInfo_GridPosition proto.InternalMessageInfo 63 64 func (m *GridPosition) GetX() int32 { 65 if m != nil { 66 return m.X 67 } 68 return 0 69 } 70 71 func (m *GridPosition) GetY() int32 { 72 if m != nil { 73 return m.Y 74 } 75 return 0 76 } 77 78 // Connection contains information about a single gRPC client connection 79 type Connection struct { 80 FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` 81 Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"` 82 Time int64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` 83 } 84 85 func (m *Connection) Reset() { *m = Connection{} } 86 func (m *Connection) String() string { return proto.CompactTextString(m) } 87 func (*Connection) ProtoMessage() {} 88 func (*Connection) Descriptor() ([]byte, []int) { 89 return fileDescriptor_ea61f6686f6b957c, []int{1} 90 } 91 func (m *Connection) XXX_Unmarshal(b []byte) error { 92 return m.Unmarshal(b) 93 } 94 func (m *Connection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 95 if deterministic { 96 return xxx_messageInfo_Connection.Marshal(b, m, deterministic) 97 } else { 98 b = b[:cap(b)] 99 n, err := m.MarshalToSizedBuffer(b) 100 if err != nil { 101 return nil, err 102 } 103 return b[:n], nil 104 } 105 } 106 func (m *Connection) XXX_Merge(src proto.Message) { 107 xxx_messageInfo_Connection.Merge(m, src) 108 } 109 func (m *Connection) XXX_Size() int { 110 return m.Size() 111 } 112 func (m *Connection) XXX_DiscardUnknown() { 113 xxx_messageInfo_Connection.DiscardUnknown(m) 114 } 115 116 var xxx_messageInfo_Connection proto.InternalMessageInfo 117 118 func (m *Connection) GetFromAddress() string { 119 if m != nil { 120 return m.FromAddress 121 } 122 return "" 123 } 124 125 func (m *Connection) GetProtocol() string { 126 if m != nil { 127 return m.Protocol 128 } 129 return "" 130 } 131 132 func (m *Connection) GetTime() int64 { 133 if m != nil { 134 return m.Time 135 } 136 return 0 137 } 138 139 // IOStats represents I/O statistics for a single device agent 140 type IOStats struct { 141 InBytes uint32 `protobuf:"varint,1,opt,name=in_bytes,json=inBytes,proto3" json:"in_bytes,omitempty"` 142 InMessages uint32 `protobuf:"varint,2,opt,name=in_messages,json=inMessages,proto3" json:"in_messages,omitempty"` 143 OutBytes uint32 `protobuf:"varint,3,opt,name=out_bytes,json=outBytes,proto3" json:"out_bytes,omitempty"` 144 OutMessages uint32 `protobuf:"varint,4,opt,name=out_messages,json=outMessages,proto3" json:"out_messages,omitempty"` 145 FirstUpdateTime uint64 `protobuf:"varint,5,opt,name=first_update_time,json=firstUpdateTime,proto3" json:"first_update_time,omitempty"` 146 LastUpdateTime uint64 `protobuf:"varint,6,opt,name=last_update_time,json=lastUpdateTime,proto3" json:"last_update_time,omitempty"` 147 } 148 149 func (m *IOStats) Reset() { *m = IOStats{} } 150 func (m *IOStats) String() string { return proto.CompactTextString(m) } 151 func (*IOStats) ProtoMessage() {} 152 func (*IOStats) Descriptor() ([]byte, []int) { 153 return fileDescriptor_ea61f6686f6b957c, []int{2} 154 } 155 func (m *IOStats) XXX_Unmarshal(b []byte) error { 156 return m.Unmarshal(b) 157 } 158 func (m *IOStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 159 if deterministic { 160 return xxx_messageInfo_IOStats.Marshal(b, m, deterministic) 161 } else { 162 b = b[:cap(b)] 163 n, err := m.MarshalToSizedBuffer(b) 164 if err != nil { 165 return nil, err 166 } 167 return b[:n], nil 168 } 169 } 170 func (m *IOStats) XXX_Merge(src proto.Message) { 171 xxx_messageInfo_IOStats.Merge(m, src) 172 } 173 func (m *IOStats) XXX_Size() int { 174 return m.Size() 175 } 176 func (m *IOStats) XXX_DiscardUnknown() { 177 xxx_messageInfo_IOStats.DiscardUnknown(m) 178 } 179 180 var xxx_messageInfo_IOStats proto.InternalMessageInfo 181 182 func (m *IOStats) GetInBytes() uint32 { 183 if m != nil { 184 return m.InBytes 185 } 186 return 0 187 } 188 189 func (m *IOStats) GetInMessages() uint32 { 190 if m != nil { 191 return m.InMessages 192 } 193 return 0 194 } 195 196 func (m *IOStats) GetOutBytes() uint32 { 197 if m != nil { 198 return m.OutBytes 199 } 200 return 0 201 } 202 203 func (m *IOStats) GetOutMessages() uint32 { 204 if m != nil { 205 return m.OutMessages 206 } 207 return 0 208 } 209 210 func (m *IOStats) GetFirstUpdateTime() uint64 { 211 if m != nil { 212 return m.FirstUpdateTime 213 } 214 return 0 215 } 216 217 func (m *IOStats) GetLastUpdateTime() uint64 { 218 if m != nil { 219 return m.LastUpdateTime 220 } 221 return 0 222 } 223 224 func init() { 225 proto.RegisterType((*GridPosition)(nil), "onos.misc.GridPosition") 226 proto.RegisterType((*Connection)(nil), "onos.misc.Connection") 227 proto.RegisterType((*IOStats)(nil), "onos.misc.IOStats") 228 } 229 230 func init() { proto.RegisterFile("onos/misc/misc.proto", fileDescriptor_ea61f6686f6b957c) } 231 232 var fileDescriptor_ea61f6686f6b957c = []byte{ 233 // 315 bytes of a gzipped FileDescriptorProto 234 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xbd, 0x4e, 0xf3, 0x30, 235 0x14, 0x86, 0xeb, 0xaf, 0xbf, 0x39, 0x4d, 0x3f, 0xc0, 0x62, 0x08, 0x20, 0x85, 0xb6, 0x53, 0xd4, 236 0xa1, 0x0c, 0x5c, 0x01, 0x65, 0x40, 0x0c, 0x08, 0x64, 0x60, 0xb6, 0xd2, 0xc6, 0x45, 0x96, 0x1a, 237 0x9f, 0x2a, 0x76, 0xa4, 0xf6, 0x2e, 0xb8, 0x2c, 0xc6, 0x8e, 0x48, 0x2c, 0xa8, 0xbd, 0x11, 0xe4, 238 0x93, 0xaa, 0x48, 0x2c, 0x51, 0xde, 0xe7, 0xfd, 0xb1, 0x65, 0x38, 0x45, 0x83, 0xf6, 0x2a, 0xd7, 239 0x76, 0x46, 0x9f, 0xf1, 0xb2, 0x40, 0x87, 0x3c, 0xf0, 0x74, 0xec, 0xc1, 0x70, 0x04, 0xe1, 0x5d, 240 0xa1, 0xb3, 0x27, 0xb4, 0xda, 0x69, 0x34, 0x3c, 0x04, 0xb6, 0x8a, 0x58, 0x9f, 0x25, 0x4d, 0xc1, 241 0x56, 0x5e, 0xad, 0xa3, 0x7f, 0x95, 0x5a, 0x0f, 0x25, 0xc0, 0x2d, 0x1a, 0xa3, 0x66, 0x94, 0x1c, 242 0x40, 0x38, 0x2f, 0x30, 0x97, 0x69, 0x96, 0x15, 0xca, 0x5a, 0x2a, 0x05, 0xa2, 0xeb, 0xd9, 0x4d, 243 0x85, 0xf8, 0x39, 0x74, 0xe8, 0xc0, 0x19, 0x2e, 0x68, 0x25, 0x10, 0x07, 0xcd, 0x39, 0x34, 0x9c, 244 0xce, 0x55, 0x54, 0xef, 0xb3, 0xa4, 0x2e, 0xe8, 0x7f, 0xf8, 0xc5, 0xa0, 0x7d, 0xff, 0xf8, 0xec, 245 0x52, 0x67, 0xf9, 0x19, 0x74, 0xb4, 0x91, 0xd3, 0xb5, 0x53, 0xd5, 0x74, 0x4f, 0xb4, 0xb5, 0x99, 246 0x78, 0xc9, 0x2f, 0xa1, 0xab, 0x8d, 0xcc, 0x95, 0xb5, 0xe9, 0x9b, 0xb2, 0xb4, 0xdc, 0x13, 0xa0, 247 0xcd, 0xc3, 0x9e, 0xf0, 0x0b, 0x08, 0xb0, 0x74, 0xfb, 0x72, 0x9d, 0xec, 0x0e, 0x96, 0xae, 0x6a, 248 0x0f, 0x20, 0xf4, 0xe6, 0xa1, 0xde, 0x20, 0xbf, 0x8b, 0xa5, 0x3b, 0xf4, 0x47, 0x70, 0x32, 0xd7, 249 0x85, 0x75, 0xb2, 0x5c, 0x66, 0xa9, 0x53, 0x92, 0x2e, 0xda, 0xec, 0xb3, 0xa4, 0x21, 0x8e, 0xc8, 250 0x78, 0x25, 0xfe, 0xa2, 0x73, 0xc5, 0x13, 0x38, 0x5e, 0xa4, 0x7f, 0xa2, 0x2d, 0x8a, 0xfe, 0xf7, 251 0xfc, 0x37, 0x39, 0x89, 0x3e, 0xb6, 0x31, 0xdb, 0x6c, 0x63, 0xf6, 0xbd, 0x8d, 0xd9, 0xfb, 0x2e, 252 0xae, 0x6d, 0x76, 0x71, 0xed, 0x73, 0x17, 0xd7, 0xa6, 0x2d, 0x7a, 0x95, 0xeb, 0x9f, 0x00, 0x00, 253 0x00, 0xff, 0xff, 0x0c, 0x75, 0x8f, 0x2d, 0xae, 0x01, 0x00, 0x00, 254 } 255 256 func (m *GridPosition) Marshal() (dAtA []byte, err error) { 257 size := m.Size() 258 dAtA = make([]byte, size) 259 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 260 if err != nil { 261 return nil, err 262 } 263 return dAtA[:n], nil 264 } 265 266 func (m *GridPosition) MarshalTo(dAtA []byte) (int, error) { 267 size := m.Size() 268 return m.MarshalToSizedBuffer(dAtA[:size]) 269 } 270 271 func (m *GridPosition) MarshalToSizedBuffer(dAtA []byte) (int, error) { 272 i := len(dAtA) 273 _ = i 274 var l int 275 _ = l 276 if m.Y != 0 { 277 i = encodeVarintMisc(dAtA, i, uint64(m.Y)) 278 i-- 279 dAtA[i] = 0x10 280 } 281 if m.X != 0 { 282 i = encodeVarintMisc(dAtA, i, uint64(m.X)) 283 i-- 284 dAtA[i] = 0x8 285 } 286 return len(dAtA) - i, nil 287 } 288 289 func (m *Connection) Marshal() (dAtA []byte, err error) { 290 size := m.Size() 291 dAtA = make([]byte, size) 292 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 293 if err != nil { 294 return nil, err 295 } 296 return dAtA[:n], nil 297 } 298 299 func (m *Connection) MarshalTo(dAtA []byte) (int, error) { 300 size := m.Size() 301 return m.MarshalToSizedBuffer(dAtA[:size]) 302 } 303 304 func (m *Connection) MarshalToSizedBuffer(dAtA []byte) (int, error) { 305 i := len(dAtA) 306 _ = i 307 var l int 308 _ = l 309 if m.Time != 0 { 310 i = encodeVarintMisc(dAtA, i, uint64(m.Time)) 311 i-- 312 dAtA[i] = 0x18 313 } 314 if len(m.Protocol) > 0 { 315 i -= len(m.Protocol) 316 copy(dAtA[i:], m.Protocol) 317 i = encodeVarintMisc(dAtA, i, uint64(len(m.Protocol))) 318 i-- 319 dAtA[i] = 0x12 320 } 321 if len(m.FromAddress) > 0 { 322 i -= len(m.FromAddress) 323 copy(dAtA[i:], m.FromAddress) 324 i = encodeVarintMisc(dAtA, i, uint64(len(m.FromAddress))) 325 i-- 326 dAtA[i] = 0xa 327 } 328 return len(dAtA) - i, nil 329 } 330 331 func (m *IOStats) Marshal() (dAtA []byte, err error) { 332 size := m.Size() 333 dAtA = make([]byte, size) 334 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 335 if err != nil { 336 return nil, err 337 } 338 return dAtA[:n], nil 339 } 340 341 func (m *IOStats) MarshalTo(dAtA []byte) (int, error) { 342 size := m.Size() 343 return m.MarshalToSizedBuffer(dAtA[:size]) 344 } 345 346 func (m *IOStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { 347 i := len(dAtA) 348 _ = i 349 var l int 350 _ = l 351 if m.LastUpdateTime != 0 { 352 i = encodeVarintMisc(dAtA, i, uint64(m.LastUpdateTime)) 353 i-- 354 dAtA[i] = 0x30 355 } 356 if m.FirstUpdateTime != 0 { 357 i = encodeVarintMisc(dAtA, i, uint64(m.FirstUpdateTime)) 358 i-- 359 dAtA[i] = 0x28 360 } 361 if m.OutMessages != 0 { 362 i = encodeVarintMisc(dAtA, i, uint64(m.OutMessages)) 363 i-- 364 dAtA[i] = 0x20 365 } 366 if m.OutBytes != 0 { 367 i = encodeVarintMisc(dAtA, i, uint64(m.OutBytes)) 368 i-- 369 dAtA[i] = 0x18 370 } 371 if m.InMessages != 0 { 372 i = encodeVarintMisc(dAtA, i, uint64(m.InMessages)) 373 i-- 374 dAtA[i] = 0x10 375 } 376 if m.InBytes != 0 { 377 i = encodeVarintMisc(dAtA, i, uint64(m.InBytes)) 378 i-- 379 dAtA[i] = 0x8 380 } 381 return len(dAtA) - i, nil 382 } 383 384 func encodeVarintMisc(dAtA []byte, offset int, v uint64) int { 385 offset -= sovMisc(v) 386 base := offset 387 for v >= 1<<7 { 388 dAtA[offset] = uint8(v&0x7f | 0x80) 389 v >>= 7 390 offset++ 391 } 392 dAtA[offset] = uint8(v) 393 return base 394 } 395 func (m *GridPosition) Size() (n int) { 396 if m == nil { 397 return 0 398 } 399 var l int 400 _ = l 401 if m.X != 0 { 402 n += 1 + sovMisc(uint64(m.X)) 403 } 404 if m.Y != 0 { 405 n += 1 + sovMisc(uint64(m.Y)) 406 } 407 return n 408 } 409 410 func (m *Connection) Size() (n int) { 411 if m == nil { 412 return 0 413 } 414 var l int 415 _ = l 416 l = len(m.FromAddress) 417 if l > 0 { 418 n += 1 + l + sovMisc(uint64(l)) 419 } 420 l = len(m.Protocol) 421 if l > 0 { 422 n += 1 + l + sovMisc(uint64(l)) 423 } 424 if m.Time != 0 { 425 n += 1 + sovMisc(uint64(m.Time)) 426 } 427 return n 428 } 429 430 func (m *IOStats) Size() (n int) { 431 if m == nil { 432 return 0 433 } 434 var l int 435 _ = l 436 if m.InBytes != 0 { 437 n += 1 + sovMisc(uint64(m.InBytes)) 438 } 439 if m.InMessages != 0 { 440 n += 1 + sovMisc(uint64(m.InMessages)) 441 } 442 if m.OutBytes != 0 { 443 n += 1 + sovMisc(uint64(m.OutBytes)) 444 } 445 if m.OutMessages != 0 { 446 n += 1 + sovMisc(uint64(m.OutMessages)) 447 } 448 if m.FirstUpdateTime != 0 { 449 n += 1 + sovMisc(uint64(m.FirstUpdateTime)) 450 } 451 if m.LastUpdateTime != 0 { 452 n += 1 + sovMisc(uint64(m.LastUpdateTime)) 453 } 454 return n 455 } 456 457 func sovMisc(x uint64) (n int) { 458 return (math_bits.Len64(x|1) + 6) / 7 459 } 460 func sozMisc(x uint64) (n int) { 461 return sovMisc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 462 } 463 func (m *GridPosition) Unmarshal(dAtA []byte) error { 464 l := len(dAtA) 465 iNdEx := 0 466 for iNdEx < l { 467 preIndex := iNdEx 468 var wire uint64 469 for shift := uint(0); ; shift += 7 { 470 if shift >= 64 { 471 return ErrIntOverflowMisc 472 } 473 if iNdEx >= l { 474 return io.ErrUnexpectedEOF 475 } 476 b := dAtA[iNdEx] 477 iNdEx++ 478 wire |= uint64(b&0x7F) << shift 479 if b < 0x80 { 480 break 481 } 482 } 483 fieldNum := int32(wire >> 3) 484 wireType := int(wire & 0x7) 485 if wireType == 4 { 486 return fmt.Errorf("proto: GridPosition: wiretype end group for non-group") 487 } 488 if fieldNum <= 0 { 489 return fmt.Errorf("proto: GridPosition: illegal tag %d (wire type %d)", fieldNum, wire) 490 } 491 switch fieldNum { 492 case 1: 493 if wireType != 0 { 494 return fmt.Errorf("proto: wrong wireType = %d for field X", wireType) 495 } 496 m.X = 0 497 for shift := uint(0); ; shift += 7 { 498 if shift >= 64 { 499 return ErrIntOverflowMisc 500 } 501 if iNdEx >= l { 502 return io.ErrUnexpectedEOF 503 } 504 b := dAtA[iNdEx] 505 iNdEx++ 506 m.X |= int32(b&0x7F) << shift 507 if b < 0x80 { 508 break 509 } 510 } 511 case 2: 512 if wireType != 0 { 513 return fmt.Errorf("proto: wrong wireType = %d for field Y", wireType) 514 } 515 m.Y = 0 516 for shift := uint(0); ; shift += 7 { 517 if shift >= 64 { 518 return ErrIntOverflowMisc 519 } 520 if iNdEx >= l { 521 return io.ErrUnexpectedEOF 522 } 523 b := dAtA[iNdEx] 524 iNdEx++ 525 m.Y |= int32(b&0x7F) << shift 526 if b < 0x80 { 527 break 528 } 529 } 530 default: 531 iNdEx = preIndex 532 skippy, err := skipMisc(dAtA[iNdEx:]) 533 if err != nil { 534 return err 535 } 536 if (skippy < 0) || (iNdEx+skippy) < 0 { 537 return ErrInvalidLengthMisc 538 } 539 if (iNdEx + skippy) > l { 540 return io.ErrUnexpectedEOF 541 } 542 iNdEx += skippy 543 } 544 } 545 546 if iNdEx > l { 547 return io.ErrUnexpectedEOF 548 } 549 return nil 550 } 551 func (m *Connection) Unmarshal(dAtA []byte) error { 552 l := len(dAtA) 553 iNdEx := 0 554 for iNdEx < l { 555 preIndex := iNdEx 556 var wire uint64 557 for shift := uint(0); ; shift += 7 { 558 if shift >= 64 { 559 return ErrIntOverflowMisc 560 } 561 if iNdEx >= l { 562 return io.ErrUnexpectedEOF 563 } 564 b := dAtA[iNdEx] 565 iNdEx++ 566 wire |= uint64(b&0x7F) << shift 567 if b < 0x80 { 568 break 569 } 570 } 571 fieldNum := int32(wire >> 3) 572 wireType := int(wire & 0x7) 573 if wireType == 4 { 574 return fmt.Errorf("proto: Connection: wiretype end group for non-group") 575 } 576 if fieldNum <= 0 { 577 return fmt.Errorf("proto: Connection: illegal tag %d (wire type %d)", fieldNum, wire) 578 } 579 switch fieldNum { 580 case 1: 581 if wireType != 2 { 582 return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) 583 } 584 var stringLen uint64 585 for shift := uint(0); ; shift += 7 { 586 if shift >= 64 { 587 return ErrIntOverflowMisc 588 } 589 if iNdEx >= l { 590 return io.ErrUnexpectedEOF 591 } 592 b := dAtA[iNdEx] 593 iNdEx++ 594 stringLen |= uint64(b&0x7F) << shift 595 if b < 0x80 { 596 break 597 } 598 } 599 intStringLen := int(stringLen) 600 if intStringLen < 0 { 601 return ErrInvalidLengthMisc 602 } 603 postIndex := iNdEx + intStringLen 604 if postIndex < 0 { 605 return ErrInvalidLengthMisc 606 } 607 if postIndex > l { 608 return io.ErrUnexpectedEOF 609 } 610 m.FromAddress = string(dAtA[iNdEx:postIndex]) 611 iNdEx = postIndex 612 case 2: 613 if wireType != 2 { 614 return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) 615 } 616 var stringLen uint64 617 for shift := uint(0); ; shift += 7 { 618 if shift >= 64 { 619 return ErrIntOverflowMisc 620 } 621 if iNdEx >= l { 622 return io.ErrUnexpectedEOF 623 } 624 b := dAtA[iNdEx] 625 iNdEx++ 626 stringLen |= uint64(b&0x7F) << shift 627 if b < 0x80 { 628 break 629 } 630 } 631 intStringLen := int(stringLen) 632 if intStringLen < 0 { 633 return ErrInvalidLengthMisc 634 } 635 postIndex := iNdEx + intStringLen 636 if postIndex < 0 { 637 return ErrInvalidLengthMisc 638 } 639 if postIndex > l { 640 return io.ErrUnexpectedEOF 641 } 642 m.Protocol = string(dAtA[iNdEx:postIndex]) 643 iNdEx = postIndex 644 case 3: 645 if wireType != 0 { 646 return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) 647 } 648 m.Time = 0 649 for shift := uint(0); ; shift += 7 { 650 if shift >= 64 { 651 return ErrIntOverflowMisc 652 } 653 if iNdEx >= l { 654 return io.ErrUnexpectedEOF 655 } 656 b := dAtA[iNdEx] 657 iNdEx++ 658 m.Time |= int64(b&0x7F) << shift 659 if b < 0x80 { 660 break 661 } 662 } 663 default: 664 iNdEx = preIndex 665 skippy, err := skipMisc(dAtA[iNdEx:]) 666 if err != nil { 667 return err 668 } 669 if (skippy < 0) || (iNdEx+skippy) < 0 { 670 return ErrInvalidLengthMisc 671 } 672 if (iNdEx + skippy) > l { 673 return io.ErrUnexpectedEOF 674 } 675 iNdEx += skippy 676 } 677 } 678 679 if iNdEx > l { 680 return io.ErrUnexpectedEOF 681 } 682 return nil 683 } 684 func (m *IOStats) Unmarshal(dAtA []byte) error { 685 l := len(dAtA) 686 iNdEx := 0 687 for iNdEx < l { 688 preIndex := iNdEx 689 var wire uint64 690 for shift := uint(0); ; shift += 7 { 691 if shift >= 64 { 692 return ErrIntOverflowMisc 693 } 694 if iNdEx >= l { 695 return io.ErrUnexpectedEOF 696 } 697 b := dAtA[iNdEx] 698 iNdEx++ 699 wire |= uint64(b&0x7F) << shift 700 if b < 0x80 { 701 break 702 } 703 } 704 fieldNum := int32(wire >> 3) 705 wireType := int(wire & 0x7) 706 if wireType == 4 { 707 return fmt.Errorf("proto: IOStats: wiretype end group for non-group") 708 } 709 if fieldNum <= 0 { 710 return fmt.Errorf("proto: IOStats: illegal tag %d (wire type %d)", fieldNum, wire) 711 } 712 switch fieldNum { 713 case 1: 714 if wireType != 0 { 715 return fmt.Errorf("proto: wrong wireType = %d for field InBytes", wireType) 716 } 717 m.InBytes = 0 718 for shift := uint(0); ; shift += 7 { 719 if shift >= 64 { 720 return ErrIntOverflowMisc 721 } 722 if iNdEx >= l { 723 return io.ErrUnexpectedEOF 724 } 725 b := dAtA[iNdEx] 726 iNdEx++ 727 m.InBytes |= uint32(b&0x7F) << shift 728 if b < 0x80 { 729 break 730 } 731 } 732 case 2: 733 if wireType != 0 { 734 return fmt.Errorf("proto: wrong wireType = %d for field InMessages", wireType) 735 } 736 m.InMessages = 0 737 for shift := uint(0); ; shift += 7 { 738 if shift >= 64 { 739 return ErrIntOverflowMisc 740 } 741 if iNdEx >= l { 742 return io.ErrUnexpectedEOF 743 } 744 b := dAtA[iNdEx] 745 iNdEx++ 746 m.InMessages |= uint32(b&0x7F) << shift 747 if b < 0x80 { 748 break 749 } 750 } 751 case 3: 752 if wireType != 0 { 753 return fmt.Errorf("proto: wrong wireType = %d for field OutBytes", wireType) 754 } 755 m.OutBytes = 0 756 for shift := uint(0); ; shift += 7 { 757 if shift >= 64 { 758 return ErrIntOverflowMisc 759 } 760 if iNdEx >= l { 761 return io.ErrUnexpectedEOF 762 } 763 b := dAtA[iNdEx] 764 iNdEx++ 765 m.OutBytes |= uint32(b&0x7F) << shift 766 if b < 0x80 { 767 break 768 } 769 } 770 case 4: 771 if wireType != 0 { 772 return fmt.Errorf("proto: wrong wireType = %d for field OutMessages", wireType) 773 } 774 m.OutMessages = 0 775 for shift := uint(0); ; shift += 7 { 776 if shift >= 64 { 777 return ErrIntOverflowMisc 778 } 779 if iNdEx >= l { 780 return io.ErrUnexpectedEOF 781 } 782 b := dAtA[iNdEx] 783 iNdEx++ 784 m.OutMessages |= uint32(b&0x7F) << shift 785 if b < 0x80 { 786 break 787 } 788 } 789 case 5: 790 if wireType != 0 { 791 return fmt.Errorf("proto: wrong wireType = %d for field FirstUpdateTime", wireType) 792 } 793 m.FirstUpdateTime = 0 794 for shift := uint(0); ; shift += 7 { 795 if shift >= 64 { 796 return ErrIntOverflowMisc 797 } 798 if iNdEx >= l { 799 return io.ErrUnexpectedEOF 800 } 801 b := dAtA[iNdEx] 802 iNdEx++ 803 m.FirstUpdateTime |= uint64(b&0x7F) << shift 804 if b < 0x80 { 805 break 806 } 807 } 808 case 6: 809 if wireType != 0 { 810 return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) 811 } 812 m.LastUpdateTime = 0 813 for shift := uint(0); ; shift += 7 { 814 if shift >= 64 { 815 return ErrIntOverflowMisc 816 } 817 if iNdEx >= l { 818 return io.ErrUnexpectedEOF 819 } 820 b := dAtA[iNdEx] 821 iNdEx++ 822 m.LastUpdateTime |= uint64(b&0x7F) << shift 823 if b < 0x80 { 824 break 825 } 826 } 827 default: 828 iNdEx = preIndex 829 skippy, err := skipMisc(dAtA[iNdEx:]) 830 if err != nil { 831 return err 832 } 833 if (skippy < 0) || (iNdEx+skippy) < 0 { 834 return ErrInvalidLengthMisc 835 } 836 if (iNdEx + skippy) > l { 837 return io.ErrUnexpectedEOF 838 } 839 iNdEx += skippy 840 } 841 } 842 843 if iNdEx > l { 844 return io.ErrUnexpectedEOF 845 } 846 return nil 847 } 848 func skipMisc(dAtA []byte) (n int, err error) { 849 l := len(dAtA) 850 iNdEx := 0 851 depth := 0 852 for iNdEx < l { 853 var wire uint64 854 for shift := uint(0); ; shift += 7 { 855 if shift >= 64 { 856 return 0, ErrIntOverflowMisc 857 } 858 if iNdEx >= l { 859 return 0, io.ErrUnexpectedEOF 860 } 861 b := dAtA[iNdEx] 862 iNdEx++ 863 wire |= (uint64(b) & 0x7F) << shift 864 if b < 0x80 { 865 break 866 } 867 } 868 wireType := int(wire & 0x7) 869 switch wireType { 870 case 0: 871 for shift := uint(0); ; shift += 7 { 872 if shift >= 64 { 873 return 0, ErrIntOverflowMisc 874 } 875 if iNdEx >= l { 876 return 0, io.ErrUnexpectedEOF 877 } 878 iNdEx++ 879 if dAtA[iNdEx-1] < 0x80 { 880 break 881 } 882 } 883 case 1: 884 iNdEx += 8 885 case 2: 886 var length int 887 for shift := uint(0); ; shift += 7 { 888 if shift >= 64 { 889 return 0, ErrIntOverflowMisc 890 } 891 if iNdEx >= l { 892 return 0, io.ErrUnexpectedEOF 893 } 894 b := dAtA[iNdEx] 895 iNdEx++ 896 length |= (int(b) & 0x7F) << shift 897 if b < 0x80 { 898 break 899 } 900 } 901 if length < 0 { 902 return 0, ErrInvalidLengthMisc 903 } 904 iNdEx += length 905 case 3: 906 depth++ 907 case 4: 908 if depth == 0 { 909 return 0, ErrUnexpectedEndOfGroupMisc 910 } 911 depth-- 912 case 5: 913 iNdEx += 4 914 default: 915 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 916 } 917 if iNdEx < 0 { 918 return 0, ErrInvalidLengthMisc 919 } 920 if depth == 0 { 921 return iNdEx, nil 922 } 923 } 924 return 0, io.ErrUnexpectedEOF 925 } 926 927 var ( 928 ErrInvalidLengthMisc = fmt.Errorf("proto: negative length found during unmarshaling") 929 ErrIntOverflowMisc = fmt.Errorf("proto: integer overflow") 930 ErrUnexpectedEndOfGroupMisc = fmt.Errorf("proto: unexpected end of group") 931 )