github.com/matrixorigin/matrixone@v1.2.0/pkg/pb/logtail/logtail.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: logtail.proto 3 4 package logtail 5 6 import ( 7 fmt "fmt" 8 io "io" 9 math "math" 10 math_bits "math/bits" 11 12 _ "github.com/gogo/protobuf/gogoproto" 13 proto "github.com/gogo/protobuf/proto" 14 api "github.com/matrixorigin/matrixone/pkg/pb/api" 15 timestamp "github.com/matrixorigin/matrixone/pkg/pb/timestamp" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 28 29 // SubscribeRequest is the request for subscription. 30 type SubscribeRequest struct { 31 Table *api.TableID `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` 32 XXX_NoUnkeyedLiteral struct{} `json:"-"` 33 XXX_unrecognized []byte `json:"-"` 34 XXX_sizecache int32 `json:"-"` 35 } 36 37 func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} } 38 func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) } 39 func (*SubscribeRequest) ProtoMessage() {} 40 func (*SubscribeRequest) Descriptor() ([]byte, []int) { 41 return fileDescriptor_3604137dacc8e6bf, []int{0} 42 } 43 func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error { 44 return m.Unmarshal(b) 45 } 46 func (m *SubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 if deterministic { 48 return xxx_messageInfo_SubscribeRequest.Marshal(b, m, deterministic) 49 } else { 50 b = b[:cap(b)] 51 n, err := m.MarshalToSizedBuffer(b) 52 if err != nil { 53 return nil, err 54 } 55 return b[:n], nil 56 } 57 } 58 func (m *SubscribeRequest) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_SubscribeRequest.Merge(m, src) 60 } 61 func (m *SubscribeRequest) XXX_Size() int { 62 return m.ProtoSize() 63 } 64 func (m *SubscribeRequest) XXX_DiscardUnknown() { 65 xxx_messageInfo_SubscribeRequest.DiscardUnknown(m) 66 } 67 68 var xxx_messageInfo_SubscribeRequest proto.InternalMessageInfo 69 70 func (m *SubscribeRequest) GetTable() *api.TableID { 71 if m != nil { 72 return m.Table 73 } 74 return nil 75 } 76 77 // UnsubscribeRequest is the request for unsubscription. 78 type UnsubscribeRequest struct { 79 Table *api.TableID `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` 80 XXX_NoUnkeyedLiteral struct{} `json:"-"` 81 XXX_unrecognized []byte `json:"-"` 82 XXX_sizecache int32 `json:"-"` 83 } 84 85 func (m *UnsubscribeRequest) Reset() { *m = UnsubscribeRequest{} } 86 func (m *UnsubscribeRequest) String() string { return proto.CompactTextString(m) } 87 func (*UnsubscribeRequest) ProtoMessage() {} 88 func (*UnsubscribeRequest) Descriptor() ([]byte, []int) { 89 return fileDescriptor_3604137dacc8e6bf, []int{1} 90 } 91 func (m *UnsubscribeRequest) XXX_Unmarshal(b []byte) error { 92 return m.Unmarshal(b) 93 } 94 func (m *UnsubscribeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 95 if deterministic { 96 return xxx_messageInfo_UnsubscribeRequest.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 *UnsubscribeRequest) XXX_Merge(src proto.Message) { 107 xxx_messageInfo_UnsubscribeRequest.Merge(m, src) 108 } 109 func (m *UnsubscribeRequest) XXX_Size() int { 110 return m.ProtoSize() 111 } 112 func (m *UnsubscribeRequest) XXX_DiscardUnknown() { 113 xxx_messageInfo_UnsubscribeRequest.DiscardUnknown(m) 114 } 115 116 var xxx_messageInfo_UnsubscribeRequest proto.InternalMessageInfo 117 118 func (m *UnsubscribeRequest) GetTable() *api.TableID { 119 if m != nil { 120 return m.Table 121 } 122 return nil 123 } 124 125 // TableLogtail describes total or additional logtail for a table. 126 type TableLogtail struct { 127 CkpLocation string `protobuf:"bytes,1,opt,name=ckp_location,json=ckpLocation,proto3" json:"ckp_location,omitempty"` 128 Ts *timestamp.Timestamp `protobuf:"bytes,2,opt,name=ts,proto3" json:"ts,omitempty"` 129 Table *api.TableID `protobuf:"bytes,3,opt,name=table,proto3" json:"table,omitempty"` 130 Commands []api.Entry `protobuf:"bytes,4,rep,name=commands,proto3" json:"commands"` 131 XXX_NoUnkeyedLiteral struct{} `json:"-"` 132 XXX_unrecognized []byte `json:"-"` 133 XXX_sizecache int32 `json:"-"` 134 } 135 136 func (m *TableLogtail) Reset() { *m = TableLogtail{} } 137 func (m *TableLogtail) String() string { return proto.CompactTextString(m) } 138 func (*TableLogtail) ProtoMessage() {} 139 func (*TableLogtail) Descriptor() ([]byte, []int) { 140 return fileDescriptor_3604137dacc8e6bf, []int{2} 141 } 142 func (m *TableLogtail) XXX_Unmarshal(b []byte) error { 143 return m.Unmarshal(b) 144 } 145 func (m *TableLogtail) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 146 if deterministic { 147 return xxx_messageInfo_TableLogtail.Marshal(b, m, deterministic) 148 } else { 149 b = b[:cap(b)] 150 n, err := m.MarshalToSizedBuffer(b) 151 if err != nil { 152 return nil, err 153 } 154 return b[:n], nil 155 } 156 } 157 func (m *TableLogtail) XXX_Merge(src proto.Message) { 158 xxx_messageInfo_TableLogtail.Merge(m, src) 159 } 160 func (m *TableLogtail) XXX_Size() int { 161 return m.ProtoSize() 162 } 163 func (m *TableLogtail) XXX_DiscardUnknown() { 164 xxx_messageInfo_TableLogtail.DiscardUnknown(m) 165 } 166 167 var xxx_messageInfo_TableLogtail proto.InternalMessageInfo 168 169 func (m *TableLogtail) GetCkpLocation() string { 170 if m != nil { 171 return m.CkpLocation 172 } 173 return "" 174 } 175 176 func (m *TableLogtail) GetTs() *timestamp.Timestamp { 177 if m != nil { 178 return m.Ts 179 } 180 return nil 181 } 182 183 func (m *TableLogtail) GetTable() *api.TableID { 184 if m != nil { 185 return m.Table 186 } 187 return nil 188 } 189 190 func (m *TableLogtail) GetCommands() []api.Entry { 191 if m != nil { 192 return m.Commands 193 } 194 return nil 195 } 196 197 // Status describes error details. 198 type Status struct { 199 // error code from moerr package 200 Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` 201 // error message 202 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` 203 XXX_NoUnkeyedLiteral struct{} `json:"-"` 204 XXX_unrecognized []byte `json:"-"` 205 XXX_sizecache int32 `json:"-"` 206 } 207 208 func (m *Status) Reset() { *m = Status{} } 209 func (m *Status) String() string { return proto.CompactTextString(m) } 210 func (*Status) ProtoMessage() {} 211 func (*Status) Descriptor() ([]byte, []int) { 212 return fileDescriptor_3604137dacc8e6bf, []int{3} 213 } 214 func (m *Status) XXX_Unmarshal(b []byte) error { 215 return m.Unmarshal(b) 216 } 217 func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 218 if deterministic { 219 return xxx_messageInfo_Status.Marshal(b, m, deterministic) 220 } else { 221 b = b[:cap(b)] 222 n, err := m.MarshalToSizedBuffer(b) 223 if err != nil { 224 return nil, err 225 } 226 return b[:n], nil 227 } 228 } 229 func (m *Status) XXX_Merge(src proto.Message) { 230 xxx_messageInfo_Status.Merge(m, src) 231 } 232 func (m *Status) XXX_Size() int { 233 return m.ProtoSize() 234 } 235 func (m *Status) XXX_DiscardUnknown() { 236 xxx_messageInfo_Status.DiscardUnknown(m) 237 } 238 239 var xxx_messageInfo_Status proto.InternalMessageInfo 240 241 func (m *Status) GetCode() uint32 { 242 if m != nil { 243 return m.Code 244 } 245 return 0 246 } 247 248 func (m *Status) GetMessage() string { 249 if m != nil { 250 return m.Message 251 } 252 return "" 253 } 254 255 // ErrorResponse is the response to notify CN with error. 256 type ErrorResponse struct { 257 Status Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status"` 258 Table *api.TableID `protobuf:"bytes,2,opt,name=table,proto3" json:"table,omitempty"` 259 XXX_NoUnkeyedLiteral struct{} `json:"-"` 260 XXX_unrecognized []byte `json:"-"` 261 XXX_sizecache int32 `json:"-"` 262 } 263 264 func (m *ErrorResponse) Reset() { *m = ErrorResponse{} } 265 func (m *ErrorResponse) String() string { return proto.CompactTextString(m) } 266 func (*ErrorResponse) ProtoMessage() {} 267 func (*ErrorResponse) Descriptor() ([]byte, []int) { 268 return fileDescriptor_3604137dacc8e6bf, []int{4} 269 } 270 func (m *ErrorResponse) XXX_Unmarshal(b []byte) error { 271 return m.Unmarshal(b) 272 } 273 func (m *ErrorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 274 if deterministic { 275 return xxx_messageInfo_ErrorResponse.Marshal(b, m, deterministic) 276 } else { 277 b = b[:cap(b)] 278 n, err := m.MarshalToSizedBuffer(b) 279 if err != nil { 280 return nil, err 281 } 282 return b[:n], nil 283 } 284 } 285 func (m *ErrorResponse) XXX_Merge(src proto.Message) { 286 xxx_messageInfo_ErrorResponse.Merge(m, src) 287 } 288 func (m *ErrorResponse) XXX_Size() int { 289 return m.ProtoSize() 290 } 291 func (m *ErrorResponse) XXX_DiscardUnknown() { 292 xxx_messageInfo_ErrorResponse.DiscardUnknown(m) 293 } 294 295 var xxx_messageInfo_ErrorResponse proto.InternalMessageInfo 296 297 func (m *ErrorResponse) GetStatus() Status { 298 if m != nil { 299 return m.Status 300 } 301 return Status{} 302 } 303 304 func (m *ErrorResponse) GetTable() *api.TableID { 305 if m != nil { 306 return m.Table 307 } 308 return nil 309 } 310 311 // SubscribeResponse is the response for subscription 312 // 313 // It contains total logtail for the newly subscribed table. 314 type SubscribeResponse struct { 315 Logtail TableLogtail `protobuf:"bytes,1,opt,name=logtail,proto3" json:"logtail"` 316 XXX_NoUnkeyedLiteral struct{} `json:"-"` 317 XXX_unrecognized []byte `json:"-"` 318 XXX_sizecache int32 `json:"-"` 319 } 320 321 func (m *SubscribeResponse) Reset() { *m = SubscribeResponse{} } 322 func (m *SubscribeResponse) String() string { return proto.CompactTextString(m) } 323 func (*SubscribeResponse) ProtoMessage() {} 324 func (*SubscribeResponse) Descriptor() ([]byte, []int) { 325 return fileDescriptor_3604137dacc8e6bf, []int{5} 326 } 327 func (m *SubscribeResponse) XXX_Unmarshal(b []byte) error { 328 return m.Unmarshal(b) 329 } 330 func (m *SubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 331 if deterministic { 332 return xxx_messageInfo_SubscribeResponse.Marshal(b, m, deterministic) 333 } else { 334 b = b[:cap(b)] 335 n, err := m.MarshalToSizedBuffer(b) 336 if err != nil { 337 return nil, err 338 } 339 return b[:n], nil 340 } 341 } 342 func (m *SubscribeResponse) XXX_Merge(src proto.Message) { 343 xxx_messageInfo_SubscribeResponse.Merge(m, src) 344 } 345 func (m *SubscribeResponse) XXX_Size() int { 346 return m.ProtoSize() 347 } 348 func (m *SubscribeResponse) XXX_DiscardUnknown() { 349 xxx_messageInfo_SubscribeResponse.DiscardUnknown(m) 350 } 351 352 var xxx_messageInfo_SubscribeResponse proto.InternalMessageInfo 353 354 func (m *SubscribeResponse) GetLogtail() TableLogtail { 355 if m != nil { 356 return m.Logtail 357 } 358 return TableLogtail{} 359 } 360 361 // UpdateResponse is the response for additional logtail 362 // 363 // It contains additional logtail for all subscribed tables. 364 // The range of duration is (From, to]. 365 type UpdateResponse struct { 366 From *timestamp.Timestamp `protobuf:"bytes,1,opt,name=From,proto3" json:"From,omitempty"` 367 To *timestamp.Timestamp `protobuf:"bytes,2,opt,name=To,proto3" json:"To,omitempty"` 368 LogtailList []TableLogtail `protobuf:"bytes,3,rep,name=logtail_list,json=logtailList,proto3" json:"logtail_list"` 369 XXX_NoUnkeyedLiteral struct{} `json:"-"` 370 XXX_unrecognized []byte `json:"-"` 371 XXX_sizecache int32 `json:"-"` 372 } 373 374 func (m *UpdateResponse) Reset() { *m = UpdateResponse{} } 375 func (m *UpdateResponse) String() string { return proto.CompactTextString(m) } 376 func (*UpdateResponse) ProtoMessage() {} 377 func (*UpdateResponse) Descriptor() ([]byte, []int) { 378 return fileDescriptor_3604137dacc8e6bf, []int{6} 379 } 380 func (m *UpdateResponse) XXX_Unmarshal(b []byte) error { 381 return m.Unmarshal(b) 382 } 383 func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 384 if deterministic { 385 return xxx_messageInfo_UpdateResponse.Marshal(b, m, deterministic) 386 } else { 387 b = b[:cap(b)] 388 n, err := m.MarshalToSizedBuffer(b) 389 if err != nil { 390 return nil, err 391 } 392 return b[:n], nil 393 } 394 } 395 func (m *UpdateResponse) XXX_Merge(src proto.Message) { 396 xxx_messageInfo_UpdateResponse.Merge(m, src) 397 } 398 func (m *UpdateResponse) XXX_Size() int { 399 return m.ProtoSize() 400 } 401 func (m *UpdateResponse) XXX_DiscardUnknown() { 402 xxx_messageInfo_UpdateResponse.DiscardUnknown(m) 403 } 404 405 var xxx_messageInfo_UpdateResponse proto.InternalMessageInfo 406 407 func (m *UpdateResponse) GetFrom() *timestamp.Timestamp { 408 if m != nil { 409 return m.From 410 } 411 return nil 412 } 413 414 func (m *UpdateResponse) GetTo() *timestamp.Timestamp { 415 if m != nil { 416 return m.To 417 } 418 return nil 419 } 420 421 func (m *UpdateResponse) GetLogtailList() []TableLogtail { 422 if m != nil { 423 return m.LogtailList 424 } 425 return nil 426 } 427 428 // UnSubscribeResponse is the response for unsubscription 429 type UnSubscribeResponse struct { 430 Table *api.TableID `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"` 431 XXX_NoUnkeyedLiteral struct{} `json:"-"` 432 XXX_unrecognized []byte `json:"-"` 433 XXX_sizecache int32 `json:"-"` 434 } 435 436 func (m *UnSubscribeResponse) Reset() { *m = UnSubscribeResponse{} } 437 func (m *UnSubscribeResponse) String() string { return proto.CompactTextString(m) } 438 func (*UnSubscribeResponse) ProtoMessage() {} 439 func (*UnSubscribeResponse) Descriptor() ([]byte, []int) { 440 return fileDescriptor_3604137dacc8e6bf, []int{7} 441 } 442 func (m *UnSubscribeResponse) XXX_Unmarshal(b []byte) error { 443 return m.Unmarshal(b) 444 } 445 func (m *UnSubscribeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 446 if deterministic { 447 return xxx_messageInfo_UnSubscribeResponse.Marshal(b, m, deterministic) 448 } else { 449 b = b[:cap(b)] 450 n, err := m.MarshalToSizedBuffer(b) 451 if err != nil { 452 return nil, err 453 } 454 return b[:n], nil 455 } 456 } 457 func (m *UnSubscribeResponse) XXX_Merge(src proto.Message) { 458 xxx_messageInfo_UnSubscribeResponse.Merge(m, src) 459 } 460 func (m *UnSubscribeResponse) XXX_Size() int { 461 return m.ProtoSize() 462 } 463 func (m *UnSubscribeResponse) XXX_DiscardUnknown() { 464 xxx_messageInfo_UnSubscribeResponse.DiscardUnknown(m) 465 } 466 467 var xxx_messageInfo_UnSubscribeResponse proto.InternalMessageInfo 468 469 func (m *UnSubscribeResponse) GetTable() *api.TableID { 470 if m != nil { 471 return m.Table 472 } 473 return nil 474 } 475 476 // logtail stream request 477 type LogtailRequest struct { 478 RequestId uint64 `protobuf:"varint,1,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` 479 // Types that are valid to be assigned to Request: 480 // *LogtailRequest_SubscribeTable 481 // *LogtailRequest_UnsubscribeTable 482 Request isLogtailRequest_Request `protobuf_oneof:"request"` 483 XXX_NoUnkeyedLiteral struct{} `json:"-"` 484 XXX_unrecognized []byte `json:"-"` 485 XXX_sizecache int32 `json:"-"` 486 } 487 488 func (m *LogtailRequest) Reset() { *m = LogtailRequest{} } 489 func (m *LogtailRequest) String() string { return proto.CompactTextString(m) } 490 func (*LogtailRequest) ProtoMessage() {} 491 func (*LogtailRequest) Descriptor() ([]byte, []int) { 492 return fileDescriptor_3604137dacc8e6bf, []int{8} 493 } 494 func (m *LogtailRequest) XXX_Unmarshal(b []byte) error { 495 return m.Unmarshal(b) 496 } 497 func (m *LogtailRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 498 if deterministic { 499 return xxx_messageInfo_LogtailRequest.Marshal(b, m, deterministic) 500 } else { 501 b = b[:cap(b)] 502 n, err := m.MarshalToSizedBuffer(b) 503 if err != nil { 504 return nil, err 505 } 506 return b[:n], nil 507 } 508 } 509 func (m *LogtailRequest) XXX_Merge(src proto.Message) { 510 xxx_messageInfo_LogtailRequest.Merge(m, src) 511 } 512 func (m *LogtailRequest) XXX_Size() int { 513 return m.ProtoSize() 514 } 515 func (m *LogtailRequest) XXX_DiscardUnknown() { 516 xxx_messageInfo_LogtailRequest.DiscardUnknown(m) 517 } 518 519 var xxx_messageInfo_LogtailRequest proto.InternalMessageInfo 520 521 type isLogtailRequest_Request interface { 522 isLogtailRequest_Request() 523 MarshalTo([]byte) (int, error) 524 ProtoSize() int 525 } 526 527 type LogtailRequest_SubscribeTable struct { 528 SubscribeTable *SubscribeRequest `protobuf:"bytes,2,opt,name=subscribe_table,json=subscribeTable,proto3,oneof" json:"subscribe_table,omitempty"` 529 } 530 type LogtailRequest_UnsubscribeTable struct { 531 UnsubscribeTable *UnsubscribeRequest `protobuf:"bytes,3,opt,name=unsubscribe_table,json=unsubscribeTable,proto3,oneof" json:"unsubscribe_table,omitempty"` 532 } 533 534 func (*LogtailRequest_SubscribeTable) isLogtailRequest_Request() {} 535 func (*LogtailRequest_UnsubscribeTable) isLogtailRequest_Request() {} 536 537 func (m *LogtailRequest) GetRequest() isLogtailRequest_Request { 538 if m != nil { 539 return m.Request 540 } 541 return nil 542 } 543 544 func (m *LogtailRequest) GetRequestId() uint64 { 545 if m != nil { 546 return m.RequestId 547 } 548 return 0 549 } 550 551 func (m *LogtailRequest) GetSubscribeTable() *SubscribeRequest { 552 if x, ok := m.GetRequest().(*LogtailRequest_SubscribeTable); ok { 553 return x.SubscribeTable 554 } 555 return nil 556 } 557 558 func (m *LogtailRequest) GetUnsubscribeTable() *UnsubscribeRequest { 559 if x, ok := m.GetRequest().(*LogtailRequest_UnsubscribeTable); ok { 560 return x.UnsubscribeTable 561 } 562 return nil 563 } 564 565 // XXX_OneofWrappers is for the internal use of the proto package. 566 func (*LogtailRequest) XXX_OneofWrappers() []interface{} { 567 return []interface{}{ 568 (*LogtailRequest_SubscribeTable)(nil), 569 (*LogtailRequest_UnsubscribeTable)(nil), 570 } 571 } 572 573 // logtail stream response 574 type LogtailResponse struct { 575 ResponseId uint64 `protobuf:"varint,1,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"` 576 // Types that are valid to be assigned to Response: 577 // *LogtailResponse_SubscribeResponse 578 // *LogtailResponse_UnsubscribeResponse 579 // *LogtailResponse_UpdateResponse 580 // *LogtailResponse_Error 581 Response isLogtailResponse_Response `protobuf_oneof:"response"` 582 XXX_NoUnkeyedLiteral struct{} `json:"-"` 583 XXX_unrecognized []byte `json:"-"` 584 XXX_sizecache int32 `json:"-"` 585 } 586 587 func (m *LogtailResponse) Reset() { *m = LogtailResponse{} } 588 func (m *LogtailResponse) String() string { return proto.CompactTextString(m) } 589 func (*LogtailResponse) ProtoMessage() {} 590 func (*LogtailResponse) Descriptor() ([]byte, []int) { 591 return fileDescriptor_3604137dacc8e6bf, []int{9} 592 } 593 func (m *LogtailResponse) XXX_Unmarshal(b []byte) error { 594 return m.Unmarshal(b) 595 } 596 func (m *LogtailResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 597 if deterministic { 598 return xxx_messageInfo_LogtailResponse.Marshal(b, m, deterministic) 599 } else { 600 b = b[:cap(b)] 601 n, err := m.MarshalToSizedBuffer(b) 602 if err != nil { 603 return nil, err 604 } 605 return b[:n], nil 606 } 607 } 608 func (m *LogtailResponse) XXX_Merge(src proto.Message) { 609 xxx_messageInfo_LogtailResponse.Merge(m, src) 610 } 611 func (m *LogtailResponse) XXX_Size() int { 612 return m.ProtoSize() 613 } 614 func (m *LogtailResponse) XXX_DiscardUnknown() { 615 xxx_messageInfo_LogtailResponse.DiscardUnknown(m) 616 } 617 618 var xxx_messageInfo_LogtailResponse proto.InternalMessageInfo 619 620 type isLogtailResponse_Response interface { 621 isLogtailResponse_Response() 622 MarshalTo([]byte) (int, error) 623 ProtoSize() int 624 } 625 626 type LogtailResponse_SubscribeResponse struct { 627 SubscribeResponse *SubscribeResponse `protobuf:"bytes,2,opt,name=subscribe_response,json=subscribeResponse,proto3,oneof" json:"subscribe_response,omitempty"` 628 } 629 type LogtailResponse_UnsubscribeResponse struct { 630 UnsubscribeResponse *UnSubscribeResponse `protobuf:"bytes,3,opt,name=unsubscribe_response,json=unsubscribeResponse,proto3,oneof" json:"unsubscribe_response,omitempty"` 631 } 632 type LogtailResponse_UpdateResponse struct { 633 UpdateResponse *UpdateResponse `protobuf:"bytes,4,opt,name=update_response,json=updateResponse,proto3,oneof" json:"update_response,omitempty"` 634 } 635 type LogtailResponse_Error struct { 636 Error *ErrorResponse `protobuf:"bytes,5,opt,name=error,proto3,oneof" json:"error,omitempty"` 637 } 638 639 func (*LogtailResponse_SubscribeResponse) isLogtailResponse_Response() {} 640 func (*LogtailResponse_UnsubscribeResponse) isLogtailResponse_Response() {} 641 func (*LogtailResponse_UpdateResponse) isLogtailResponse_Response() {} 642 func (*LogtailResponse_Error) isLogtailResponse_Response() {} 643 644 func (m *LogtailResponse) GetResponse() isLogtailResponse_Response { 645 if m != nil { 646 return m.Response 647 } 648 return nil 649 } 650 651 func (m *LogtailResponse) GetResponseId() uint64 { 652 if m != nil { 653 return m.ResponseId 654 } 655 return 0 656 } 657 658 func (m *LogtailResponse) GetSubscribeResponse() *SubscribeResponse { 659 if x, ok := m.GetResponse().(*LogtailResponse_SubscribeResponse); ok { 660 return x.SubscribeResponse 661 } 662 return nil 663 } 664 665 func (m *LogtailResponse) GetUnsubscribeResponse() *UnSubscribeResponse { 666 if x, ok := m.GetResponse().(*LogtailResponse_UnsubscribeResponse); ok { 667 return x.UnsubscribeResponse 668 } 669 return nil 670 } 671 672 func (m *LogtailResponse) GetUpdateResponse() *UpdateResponse { 673 if x, ok := m.GetResponse().(*LogtailResponse_UpdateResponse); ok { 674 return x.UpdateResponse 675 } 676 return nil 677 } 678 679 func (m *LogtailResponse) GetError() *ErrorResponse { 680 if x, ok := m.GetResponse().(*LogtailResponse_Error); ok { 681 return x.Error 682 } 683 return nil 684 } 685 686 // XXX_OneofWrappers is for the internal use of the proto package. 687 func (*LogtailResponse) XXX_OneofWrappers() []interface{} { 688 return []interface{}{ 689 (*LogtailResponse_SubscribeResponse)(nil), 690 (*LogtailResponse_UnsubscribeResponse)(nil), 691 (*LogtailResponse_UpdateResponse)(nil), 692 (*LogtailResponse_Error)(nil), 693 } 694 } 695 696 // message segment 697 type MessageSegment struct { 698 StreamID uint64 `protobuf:"varint,1,opt,name=StreamID,proto3" json:"StreamID,omitempty"` 699 MessageSize int32 `protobuf:"varint,2,opt,name=MessageSize,proto3" json:"MessageSize,omitempty"` 700 Sequence int32 `protobuf:"varint,3,opt,name=Sequence,proto3" json:"Sequence,omitempty"` 701 MaxSequence int32 `protobuf:"varint,4,opt,name=MaxSequence,proto3" json:"MaxSequence,omitempty"` 702 Payload []byte `protobuf:"bytes,5,opt,name=Payload,proto3" json:"Payload,omitempty"` 703 XXX_NoUnkeyedLiteral struct{} `json:"-"` 704 XXX_unrecognized []byte `json:"-"` 705 XXX_sizecache int32 `json:"-"` 706 } 707 708 func (m *MessageSegment) Reset() { *m = MessageSegment{} } 709 func (m *MessageSegment) String() string { return proto.CompactTextString(m) } 710 func (*MessageSegment) ProtoMessage() {} 711 func (*MessageSegment) Descriptor() ([]byte, []int) { 712 return fileDescriptor_3604137dacc8e6bf, []int{10} 713 } 714 func (m *MessageSegment) XXX_Unmarshal(b []byte) error { 715 return m.Unmarshal(b) 716 } 717 func (m *MessageSegment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 718 if deterministic { 719 return xxx_messageInfo_MessageSegment.Marshal(b, m, deterministic) 720 } else { 721 b = b[:cap(b)] 722 n, err := m.MarshalToSizedBuffer(b) 723 if err != nil { 724 return nil, err 725 } 726 return b[:n], nil 727 } 728 } 729 func (m *MessageSegment) XXX_Merge(src proto.Message) { 730 xxx_messageInfo_MessageSegment.Merge(m, src) 731 } 732 func (m *MessageSegment) XXX_Size() int { 733 return m.ProtoSize() 734 } 735 func (m *MessageSegment) XXX_DiscardUnknown() { 736 xxx_messageInfo_MessageSegment.DiscardUnknown(m) 737 } 738 739 var xxx_messageInfo_MessageSegment proto.InternalMessageInfo 740 741 func (m *MessageSegment) GetStreamID() uint64 { 742 if m != nil { 743 return m.StreamID 744 } 745 return 0 746 } 747 748 func (m *MessageSegment) GetMessageSize() int32 { 749 if m != nil { 750 return m.MessageSize 751 } 752 return 0 753 } 754 755 func (m *MessageSegment) GetSequence() int32 { 756 if m != nil { 757 return m.Sequence 758 } 759 return 0 760 } 761 762 func (m *MessageSegment) GetMaxSequence() int32 { 763 if m != nil { 764 return m.MaxSequence 765 } 766 return 0 767 } 768 769 func (m *MessageSegment) GetPayload() []byte { 770 if m != nil { 771 return m.Payload 772 } 773 return nil 774 } 775 776 func init() { 777 proto.RegisterType((*SubscribeRequest)(nil), "logtail.SubscribeRequest") 778 proto.RegisterType((*UnsubscribeRequest)(nil), "logtail.UnsubscribeRequest") 779 proto.RegisterType((*TableLogtail)(nil), "logtail.TableLogtail") 780 proto.RegisterType((*Status)(nil), "logtail.Status") 781 proto.RegisterType((*ErrorResponse)(nil), "logtail.ErrorResponse") 782 proto.RegisterType((*SubscribeResponse)(nil), "logtail.SubscribeResponse") 783 proto.RegisterType((*UpdateResponse)(nil), "logtail.UpdateResponse") 784 proto.RegisterType((*UnSubscribeResponse)(nil), "logtail.UnSubscribeResponse") 785 proto.RegisterType((*LogtailRequest)(nil), "logtail.LogtailRequest") 786 proto.RegisterType((*LogtailResponse)(nil), "logtail.LogtailResponse") 787 proto.RegisterType((*MessageSegment)(nil), "logtail.MessageSegment") 788 } 789 790 func init() { proto.RegisterFile("logtail.proto", fileDescriptor_3604137dacc8e6bf) } 791 792 var fileDescriptor_3604137dacc8e6bf = []byte{ 793 // 734 bytes of a gzipped FileDescriptorProto 794 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4f, 0x4f, 0xdb, 0x4a, 795 0x10, 0x8f, 0x43, 0x42, 0xc8, 0x24, 0x24, 0xb0, 0xf0, 0xde, 0xcb, 0xcb, 0x7b, 0x0d, 0xd4, 0xea, 796 0x21, 0x87, 0x92, 0x20, 0xaa, 0xa2, 0xf6, 0xd2, 0x43, 0x04, 0x55, 0x42, 0x41, 0x6a, 0x37, 0xe1, 797 0xd2, 0x4b, 0xb4, 0x76, 0xb6, 0xae, 0x45, 0xec, 0x75, 0xbd, 0x6b, 0x09, 0xfa, 0x69, 0x38, 0x55, 798 0xea, 0x37, 0xe1, 0xd0, 0x43, 0xd5, 0x0f, 0x50, 0x55, 0xf4, 0x8b, 0x54, 0xd9, 0x5d, 0xff, 0x09, 799 0x01, 0x54, 0xf5, 0x36, 0x33, 0x3b, 0xf3, 0x9b, 0xfd, 0xfd, 0x66, 0xd6, 0x86, 0xd5, 0x29, 0x73, 800 0x04, 0x71, 0xa7, 0x9d, 0x20, 0x64, 0x82, 0xa1, 0x92, 0x76, 0x9b, 0x3b, 0x8e, 0x2b, 0xde, 0x47, 801 0x56, 0xc7, 0x66, 0x5e, 0xd7, 0x61, 0x0e, 0xeb, 0xca, 0x73, 0x2b, 0x7a, 0x27, 0x3d, 0xe9, 0x48, 802 0x4b, 0xd5, 0x35, 0xeb, 0xc2, 0xf5, 0x28, 0x17, 0xc4, 0x0b, 0x74, 0xa0, 0x4c, 0x02, 0x57, 0x99, 803 0xe6, 0x3e, 0xac, 0x0d, 0x23, 0x8b, 0xdb, 0xa1, 0x6b, 0x51, 0x4c, 0x3f, 0x44, 0x94, 0x0b, 0x64, 804 0x42, 0x51, 0x10, 0x6b, 0x4a, 0x1b, 0xc6, 0xb6, 0xd1, 0xae, 0xec, 0x55, 0x3b, 0xb3, 0xf4, 0xd1, 805 0x2c, 0x32, 0x38, 0xc0, 0xea, 0xc8, 0x7c, 0x06, 0xe8, 0xd4, 0xe7, 0x7f, 0x52, 0xf9, 0xd9, 0x80, 806 0xaa, 0x0c, 0x1d, 0x2b, 0x36, 0xe8, 0x21, 0x54, 0xed, 0xb3, 0x60, 0x3c, 0x65, 0x36, 0x11, 0x2e, 807 0xf3, 0x65, 0x6d, 0x19, 0x57, 0xec, 0xb3, 0xe0, 0x58, 0x87, 0xd0, 0x23, 0xc8, 0x0b, 0xde, 0xc8, 808 0x4b, 0xd0, 0xcd, 0x4e, 0x4a, 0x67, 0x14, 0x5b, 0x38, 0x2f, 0x78, 0xda, 0x7d, 0xe9, 0xce, 0xee, 809 0xe8, 0x31, 0xac, 0xd8, 0xcc, 0xf3, 0x88, 0x3f, 0xe1, 0x8d, 0xc2, 0xf6, 0x52, 0xbb, 0xb2, 0x07, 810 0x32, 0xed, 0xd0, 0x17, 0xe1, 0x45, 0xaf, 0x70, 0xf5, 0x7d, 0x2b, 0x87, 0x93, 0x0c, 0x73, 0x1f, 811 0x96, 0x87, 0x82, 0x88, 0x88, 0x23, 0x04, 0x05, 0x9b, 0x4d, 0x14, 0xb1, 0x55, 0x2c, 0x6d, 0xd4, 812 0x80, 0x92, 0x47, 0x39, 0x27, 0x0e, 0x95, 0x57, 0x2b, 0xe3, 0xd8, 0x35, 0x2d, 0x58, 0x3d, 0x0c, 813 0x43, 0x16, 0x62, 0xca, 0x03, 0xe6, 0x73, 0x8a, 0x76, 0x60, 0x99, 0x4b, 0x20, 0xad, 0x4c, 0xbd, 814 0x13, 0x8f, 0x56, 0xe1, 0xeb, 0xce, 0x3a, 0x29, 0x65, 0x92, 0xbf, 0x5b, 0xc7, 0x23, 0x58, 0xcf, 815 0x4c, 0x4e, 0xf7, 0x79, 0x0a, 0xf1, 0x92, 0xe8, 0x46, 0x7f, 0x25, 0x8d, 0xb2, 0x9a, 0xeb, 0x76, 816 0x71, 0xae, 0x79, 0x69, 0x40, 0xed, 0x34, 0x98, 0x10, 0x91, 0x22, 0xb5, 0xa1, 0xf0, 0x32, 0x64, 817 0x9e, 0x86, 0xb9, 0x5d, 0x74, 0x99, 0x31, 0x1b, 0xce, 0x88, 0xdd, 0x3f, 0x9c, 0x11, 0x43, 0x2f, 818 0xa0, 0xaa, 0xbb, 0x8d, 0xa7, 0x2e, 0x17, 0x8d, 0x25, 0x29, 0xfe, 0xbd, 0xd7, 0xab, 0xe8, 0xb3, 819 0x63, 0x97, 0x0b, 0xf3, 0x39, 0x6c, 0x9c, 0xfa, 0x8b, 0x84, 0x7f, 0x67, 0xe3, 0xbe, 0x18, 0x50, 820 0xd3, 0xc8, 0xf1, 0xa2, 0x3e, 0x00, 0x08, 0x95, 0x39, 0x76, 0x27, 0xb2, 0xb6, 0x80, 0xcb, 0x3a, 821 0x32, 0x98, 0xa0, 0x03, 0xa8, 0x27, 0xbb, 0x3d, 0xce, 0x4e, 0xe2, 0xdf, 0x74, 0x6e, 0x37, 0x76, 822 0xbf, 0x9f, 0xc3, 0xb5, 0xa4, 0x46, 0x5e, 0x00, 0x1d, 0xc1, 0x7a, 0xe4, 0xdf, 0xc4, 0x51, 0xbb, 823 0xf9, 0x5f, 0x82, 0xb3, 0xf8, 0x8a, 0xfa, 0x39, 0xbc, 0x96, 0xa9, 0x93, 0x58, 0xbd, 0x32, 0x94, 824 0xf4, 0xf5, 0xcc, 0x6f, 0x79, 0xa8, 0x27, 0x74, 0xb4, 0x0c, 0x5b, 0x50, 0x09, 0xb5, 0x9d, 0x12, 825 0x82, 0x38, 0x34, 0x98, 0xa0, 0x57, 0x80, 0xd2, 0x9b, 0xc4, 0x71, 0x4d, 0xaa, 0x79, 0x1b, 0x29, 826 0x95, 0xd1, 0xcf, 0xe1, 0x75, 0xbe, 0x20, 0xfa, 0x1b, 0xd8, 0xcc, 0x12, 0x4b, 0xe0, 0x14, 0xb7, 827 0xff, 0x33, 0xdc, 0x6e, 0x03, 0xdc, 0x88, 0xfc, 0x45, 0xc8, 0x1e, 0xd4, 0x23, 0xb9, 0x80, 0x29, 828 0x5a, 0x41, 0xa2, 0xfd, 0x93, 0xa2, 0xcd, 0x2d, 0xe8, 0x4c, 0xef, 0x68, 0x7e, 0x65, 0x3b, 0x50, 829 0xa4, 0xb3, 0x57, 0xd7, 0x28, 0xca, 0xca, 0xbf, 0x93, 0xca, 0xb9, 0xb7, 0xd8, 0xcf, 0x61, 0x95, 830 0xd6, 0x03, 0x58, 0x89, 0x9b, 0x99, 0x9f, 0x0c, 0xa8, 0x9d, 0xa8, 0xd7, 0x3b, 0xa4, 0x8e, 0x47, 831 0x7d, 0x81, 0x9a, 0xb0, 0x32, 0x14, 0x21, 0x25, 0xde, 0xe0, 0x40, 0x0b, 0x9a, 0xf8, 0x68, 0x1b, 832 0x2a, 0x71, 0xb6, 0xfb, 0x51, 0xe9, 0x58, 0xc4, 0xd9, 0x90, 0xac, 0x9e, 0x0d, 0xcc, 0xb7, 0x95, 833 0x2e, 0x45, 0x9c, 0xf8, 0xb2, 0x9a, 0x9c, 0x27, 0xc7, 0x05, 0x5d, 0x9d, 0x86, 0x66, 0x9f, 0x96, 834 0xd7, 0xe4, 0x62, 0xca, 0xc8, 0x44, 0x92, 0xa9, 0xe2, 0xd8, 0xdd, 0x3b, 0x81, 0x52, 0xfc, 0xe1, 835 0xec, 0xa5, 0x66, 0xaa, 0xd2, 0xfc, 0xa2, 0x37, 0x1b, 0x8b, 0x07, 0x9a, 0x71, 0xae, 0x6d, 0xec, 836 0x1a, 0xbd, 0xde, 0xd5, 0x75, 0xcb, 0xf8, 0x7a, 0xdd, 0x32, 0x7e, 0x5c, 0xb7, 0x72, 0x97, 0x3f, 837 0x5b, 0xc6, 0xdb, 0xdd, 0xcc, 0xcf, 0xc5, 0x23, 0x22, 0x74, 0xcf, 0x59, 0xe8, 0x3a, 0xae, 0x1f, 838 0x3b, 0x3e, 0xed, 0x06, 0x67, 0x4e, 0x37, 0xb0, 0xba, 0x1a, 0xd9, 0x5a, 0x96, 0xbf, 0x92, 0x27, 839 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xbd, 0xae, 0x7f, 0xca, 0xaf, 0x06, 0x00, 0x00, 840 } 841 842 func (m *SubscribeRequest) Marshal() (dAtA []byte, err error) { 843 size := m.ProtoSize() 844 dAtA = make([]byte, size) 845 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 846 if err != nil { 847 return nil, err 848 } 849 return dAtA[:n], nil 850 } 851 852 func (m *SubscribeRequest) MarshalTo(dAtA []byte) (int, error) { 853 size := m.ProtoSize() 854 return m.MarshalToSizedBuffer(dAtA[:size]) 855 } 856 857 func (m *SubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 858 i := len(dAtA) 859 _ = i 860 var l int 861 _ = l 862 if m.XXX_unrecognized != nil { 863 i -= len(m.XXX_unrecognized) 864 copy(dAtA[i:], m.XXX_unrecognized) 865 } 866 if m.Table != nil { 867 { 868 size, err := m.Table.MarshalToSizedBuffer(dAtA[:i]) 869 if err != nil { 870 return 0, err 871 } 872 i -= size 873 i = encodeVarintLogtail(dAtA, i, uint64(size)) 874 } 875 i-- 876 dAtA[i] = 0xa 877 } 878 return len(dAtA) - i, nil 879 } 880 881 func (m *UnsubscribeRequest) Marshal() (dAtA []byte, err error) { 882 size := m.ProtoSize() 883 dAtA = make([]byte, size) 884 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 885 if err != nil { 886 return nil, err 887 } 888 return dAtA[:n], nil 889 } 890 891 func (m *UnsubscribeRequest) MarshalTo(dAtA []byte) (int, error) { 892 size := m.ProtoSize() 893 return m.MarshalToSizedBuffer(dAtA[:size]) 894 } 895 896 func (m *UnsubscribeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 897 i := len(dAtA) 898 _ = i 899 var l int 900 _ = l 901 if m.XXX_unrecognized != nil { 902 i -= len(m.XXX_unrecognized) 903 copy(dAtA[i:], m.XXX_unrecognized) 904 } 905 if m.Table != nil { 906 { 907 size, err := m.Table.MarshalToSizedBuffer(dAtA[:i]) 908 if err != nil { 909 return 0, err 910 } 911 i -= size 912 i = encodeVarintLogtail(dAtA, i, uint64(size)) 913 } 914 i-- 915 dAtA[i] = 0xa 916 } 917 return len(dAtA) - i, nil 918 } 919 920 func (m *TableLogtail) Marshal() (dAtA []byte, err error) { 921 size := m.ProtoSize() 922 dAtA = make([]byte, size) 923 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 924 if err != nil { 925 return nil, err 926 } 927 return dAtA[:n], nil 928 } 929 930 func (m *TableLogtail) MarshalTo(dAtA []byte) (int, error) { 931 size := m.ProtoSize() 932 return m.MarshalToSizedBuffer(dAtA[:size]) 933 } 934 935 func (m *TableLogtail) MarshalToSizedBuffer(dAtA []byte) (int, error) { 936 i := len(dAtA) 937 _ = i 938 var l int 939 _ = l 940 if m.XXX_unrecognized != nil { 941 i -= len(m.XXX_unrecognized) 942 copy(dAtA[i:], m.XXX_unrecognized) 943 } 944 if len(m.Commands) > 0 { 945 for iNdEx := len(m.Commands) - 1; iNdEx >= 0; iNdEx-- { 946 { 947 size, err := m.Commands[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 948 if err != nil { 949 return 0, err 950 } 951 i -= size 952 i = encodeVarintLogtail(dAtA, i, uint64(size)) 953 } 954 i-- 955 dAtA[i] = 0x22 956 } 957 } 958 if m.Table != nil { 959 { 960 size, err := m.Table.MarshalToSizedBuffer(dAtA[:i]) 961 if err != nil { 962 return 0, err 963 } 964 i -= size 965 i = encodeVarintLogtail(dAtA, i, uint64(size)) 966 } 967 i-- 968 dAtA[i] = 0x1a 969 } 970 if m.Ts != nil { 971 { 972 size, err := m.Ts.MarshalToSizedBuffer(dAtA[:i]) 973 if err != nil { 974 return 0, err 975 } 976 i -= size 977 i = encodeVarintLogtail(dAtA, i, uint64(size)) 978 } 979 i-- 980 dAtA[i] = 0x12 981 } 982 if len(m.CkpLocation) > 0 { 983 i -= len(m.CkpLocation) 984 copy(dAtA[i:], m.CkpLocation) 985 i = encodeVarintLogtail(dAtA, i, uint64(len(m.CkpLocation))) 986 i-- 987 dAtA[i] = 0xa 988 } 989 return len(dAtA) - i, nil 990 } 991 992 func (m *Status) Marshal() (dAtA []byte, err error) { 993 size := m.ProtoSize() 994 dAtA = make([]byte, size) 995 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 996 if err != nil { 997 return nil, err 998 } 999 return dAtA[:n], nil 1000 } 1001 1002 func (m *Status) MarshalTo(dAtA []byte) (int, error) { 1003 size := m.ProtoSize() 1004 return m.MarshalToSizedBuffer(dAtA[:size]) 1005 } 1006 1007 func (m *Status) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1008 i := len(dAtA) 1009 _ = i 1010 var l int 1011 _ = l 1012 if m.XXX_unrecognized != nil { 1013 i -= len(m.XXX_unrecognized) 1014 copy(dAtA[i:], m.XXX_unrecognized) 1015 } 1016 if len(m.Message) > 0 { 1017 i -= len(m.Message) 1018 copy(dAtA[i:], m.Message) 1019 i = encodeVarintLogtail(dAtA, i, uint64(len(m.Message))) 1020 i-- 1021 dAtA[i] = 0x12 1022 } 1023 if m.Code != 0 { 1024 i = encodeVarintLogtail(dAtA, i, uint64(m.Code)) 1025 i-- 1026 dAtA[i] = 0x8 1027 } 1028 return len(dAtA) - i, nil 1029 } 1030 1031 func (m *ErrorResponse) Marshal() (dAtA []byte, err error) { 1032 size := m.ProtoSize() 1033 dAtA = make([]byte, size) 1034 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1035 if err != nil { 1036 return nil, err 1037 } 1038 return dAtA[:n], nil 1039 } 1040 1041 func (m *ErrorResponse) MarshalTo(dAtA []byte) (int, error) { 1042 size := m.ProtoSize() 1043 return m.MarshalToSizedBuffer(dAtA[:size]) 1044 } 1045 1046 func (m *ErrorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1047 i := len(dAtA) 1048 _ = i 1049 var l int 1050 _ = l 1051 if m.XXX_unrecognized != nil { 1052 i -= len(m.XXX_unrecognized) 1053 copy(dAtA[i:], m.XXX_unrecognized) 1054 } 1055 if m.Table != nil { 1056 { 1057 size, err := m.Table.MarshalToSizedBuffer(dAtA[:i]) 1058 if err != nil { 1059 return 0, err 1060 } 1061 i -= size 1062 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1063 } 1064 i-- 1065 dAtA[i] = 0x12 1066 } 1067 { 1068 size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) 1069 if err != nil { 1070 return 0, err 1071 } 1072 i -= size 1073 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1074 } 1075 i-- 1076 dAtA[i] = 0xa 1077 return len(dAtA) - i, nil 1078 } 1079 1080 func (m *SubscribeResponse) Marshal() (dAtA []byte, err error) { 1081 size := m.ProtoSize() 1082 dAtA = make([]byte, size) 1083 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1084 if err != nil { 1085 return nil, err 1086 } 1087 return dAtA[:n], nil 1088 } 1089 1090 func (m *SubscribeResponse) MarshalTo(dAtA []byte) (int, error) { 1091 size := m.ProtoSize() 1092 return m.MarshalToSizedBuffer(dAtA[:size]) 1093 } 1094 1095 func (m *SubscribeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1096 i := len(dAtA) 1097 _ = i 1098 var l int 1099 _ = l 1100 if m.XXX_unrecognized != nil { 1101 i -= len(m.XXX_unrecognized) 1102 copy(dAtA[i:], m.XXX_unrecognized) 1103 } 1104 { 1105 size, err := m.Logtail.MarshalToSizedBuffer(dAtA[:i]) 1106 if err != nil { 1107 return 0, err 1108 } 1109 i -= size 1110 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1111 } 1112 i-- 1113 dAtA[i] = 0xa 1114 return len(dAtA) - i, nil 1115 } 1116 1117 func (m *UpdateResponse) Marshal() (dAtA []byte, err error) { 1118 size := m.ProtoSize() 1119 dAtA = make([]byte, size) 1120 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1121 if err != nil { 1122 return nil, err 1123 } 1124 return dAtA[:n], nil 1125 } 1126 1127 func (m *UpdateResponse) MarshalTo(dAtA []byte) (int, error) { 1128 size := m.ProtoSize() 1129 return m.MarshalToSizedBuffer(dAtA[:size]) 1130 } 1131 1132 func (m *UpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1133 i := len(dAtA) 1134 _ = i 1135 var l int 1136 _ = l 1137 if m.XXX_unrecognized != nil { 1138 i -= len(m.XXX_unrecognized) 1139 copy(dAtA[i:], m.XXX_unrecognized) 1140 } 1141 if len(m.LogtailList) > 0 { 1142 for iNdEx := len(m.LogtailList) - 1; iNdEx >= 0; iNdEx-- { 1143 { 1144 size, err := m.LogtailList[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1145 if err != nil { 1146 return 0, err 1147 } 1148 i -= size 1149 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1150 } 1151 i-- 1152 dAtA[i] = 0x1a 1153 } 1154 } 1155 if m.To != nil { 1156 { 1157 size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) 1158 if err != nil { 1159 return 0, err 1160 } 1161 i -= size 1162 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1163 } 1164 i-- 1165 dAtA[i] = 0x12 1166 } 1167 if m.From != nil { 1168 { 1169 size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) 1170 if err != nil { 1171 return 0, err 1172 } 1173 i -= size 1174 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1175 } 1176 i-- 1177 dAtA[i] = 0xa 1178 } 1179 return len(dAtA) - i, nil 1180 } 1181 1182 func (m *UnSubscribeResponse) Marshal() (dAtA []byte, err error) { 1183 size := m.ProtoSize() 1184 dAtA = make([]byte, size) 1185 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1186 if err != nil { 1187 return nil, err 1188 } 1189 return dAtA[:n], nil 1190 } 1191 1192 func (m *UnSubscribeResponse) MarshalTo(dAtA []byte) (int, error) { 1193 size := m.ProtoSize() 1194 return m.MarshalToSizedBuffer(dAtA[:size]) 1195 } 1196 1197 func (m *UnSubscribeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1198 i := len(dAtA) 1199 _ = i 1200 var l int 1201 _ = l 1202 if m.XXX_unrecognized != nil { 1203 i -= len(m.XXX_unrecognized) 1204 copy(dAtA[i:], m.XXX_unrecognized) 1205 } 1206 if m.Table != nil { 1207 { 1208 size, err := m.Table.MarshalToSizedBuffer(dAtA[:i]) 1209 if err != nil { 1210 return 0, err 1211 } 1212 i -= size 1213 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1214 } 1215 i-- 1216 dAtA[i] = 0xa 1217 } 1218 return len(dAtA) - i, nil 1219 } 1220 1221 func (m *LogtailRequest) Marshal() (dAtA []byte, err error) { 1222 size := m.ProtoSize() 1223 dAtA = make([]byte, size) 1224 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1225 if err != nil { 1226 return nil, err 1227 } 1228 return dAtA[:n], nil 1229 } 1230 1231 func (m *LogtailRequest) MarshalTo(dAtA []byte) (int, error) { 1232 size := m.ProtoSize() 1233 return m.MarshalToSizedBuffer(dAtA[:size]) 1234 } 1235 1236 func (m *LogtailRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1237 i := len(dAtA) 1238 _ = i 1239 var l int 1240 _ = l 1241 if m.XXX_unrecognized != nil { 1242 i -= len(m.XXX_unrecognized) 1243 copy(dAtA[i:], m.XXX_unrecognized) 1244 } 1245 if m.Request != nil { 1246 { 1247 size := m.Request.ProtoSize() 1248 i -= size 1249 if _, err := m.Request.MarshalTo(dAtA[i:]); err != nil { 1250 return 0, err 1251 } 1252 } 1253 } 1254 if m.RequestId != 0 { 1255 i = encodeVarintLogtail(dAtA, i, uint64(m.RequestId)) 1256 i-- 1257 dAtA[i] = 0x8 1258 } 1259 return len(dAtA) - i, nil 1260 } 1261 1262 func (m *LogtailRequest_SubscribeTable) MarshalTo(dAtA []byte) (int, error) { 1263 size := m.ProtoSize() 1264 return m.MarshalToSizedBuffer(dAtA[:size]) 1265 } 1266 1267 func (m *LogtailRequest_SubscribeTable) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1268 i := len(dAtA) 1269 if m.SubscribeTable != nil { 1270 { 1271 size, err := m.SubscribeTable.MarshalToSizedBuffer(dAtA[:i]) 1272 if err != nil { 1273 return 0, err 1274 } 1275 i -= size 1276 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1277 } 1278 i-- 1279 dAtA[i] = 0x12 1280 } 1281 return len(dAtA) - i, nil 1282 } 1283 func (m *LogtailRequest_UnsubscribeTable) MarshalTo(dAtA []byte) (int, error) { 1284 size := m.ProtoSize() 1285 return m.MarshalToSizedBuffer(dAtA[:size]) 1286 } 1287 1288 func (m *LogtailRequest_UnsubscribeTable) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1289 i := len(dAtA) 1290 if m.UnsubscribeTable != nil { 1291 { 1292 size, err := m.UnsubscribeTable.MarshalToSizedBuffer(dAtA[:i]) 1293 if err != nil { 1294 return 0, err 1295 } 1296 i -= size 1297 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1298 } 1299 i-- 1300 dAtA[i] = 0x1a 1301 } 1302 return len(dAtA) - i, nil 1303 } 1304 func (m *LogtailResponse) Marshal() (dAtA []byte, err error) { 1305 size := m.ProtoSize() 1306 dAtA = make([]byte, size) 1307 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1308 if err != nil { 1309 return nil, err 1310 } 1311 return dAtA[:n], nil 1312 } 1313 1314 func (m *LogtailResponse) MarshalTo(dAtA []byte) (int, error) { 1315 size := m.ProtoSize() 1316 return m.MarshalToSizedBuffer(dAtA[:size]) 1317 } 1318 1319 func (m *LogtailResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1320 i := len(dAtA) 1321 _ = i 1322 var l int 1323 _ = l 1324 if m.XXX_unrecognized != nil { 1325 i -= len(m.XXX_unrecognized) 1326 copy(dAtA[i:], m.XXX_unrecognized) 1327 } 1328 if m.Response != nil { 1329 { 1330 size := m.Response.ProtoSize() 1331 i -= size 1332 if _, err := m.Response.MarshalTo(dAtA[i:]); err != nil { 1333 return 0, err 1334 } 1335 } 1336 } 1337 if m.ResponseId != 0 { 1338 i = encodeVarintLogtail(dAtA, i, uint64(m.ResponseId)) 1339 i-- 1340 dAtA[i] = 0x8 1341 } 1342 return len(dAtA) - i, nil 1343 } 1344 1345 func (m *LogtailResponse_SubscribeResponse) MarshalTo(dAtA []byte) (int, error) { 1346 size := m.ProtoSize() 1347 return m.MarshalToSizedBuffer(dAtA[:size]) 1348 } 1349 1350 func (m *LogtailResponse_SubscribeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1351 i := len(dAtA) 1352 if m.SubscribeResponse != nil { 1353 { 1354 size, err := m.SubscribeResponse.MarshalToSizedBuffer(dAtA[:i]) 1355 if err != nil { 1356 return 0, err 1357 } 1358 i -= size 1359 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1360 } 1361 i-- 1362 dAtA[i] = 0x12 1363 } 1364 return len(dAtA) - i, nil 1365 } 1366 func (m *LogtailResponse_UnsubscribeResponse) MarshalTo(dAtA []byte) (int, error) { 1367 size := m.ProtoSize() 1368 return m.MarshalToSizedBuffer(dAtA[:size]) 1369 } 1370 1371 func (m *LogtailResponse_UnsubscribeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1372 i := len(dAtA) 1373 if m.UnsubscribeResponse != nil { 1374 { 1375 size, err := m.UnsubscribeResponse.MarshalToSizedBuffer(dAtA[:i]) 1376 if err != nil { 1377 return 0, err 1378 } 1379 i -= size 1380 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1381 } 1382 i-- 1383 dAtA[i] = 0x1a 1384 } 1385 return len(dAtA) - i, nil 1386 } 1387 func (m *LogtailResponse_UpdateResponse) MarshalTo(dAtA []byte) (int, error) { 1388 size := m.ProtoSize() 1389 return m.MarshalToSizedBuffer(dAtA[:size]) 1390 } 1391 1392 func (m *LogtailResponse_UpdateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1393 i := len(dAtA) 1394 if m.UpdateResponse != nil { 1395 { 1396 size, err := m.UpdateResponse.MarshalToSizedBuffer(dAtA[:i]) 1397 if err != nil { 1398 return 0, err 1399 } 1400 i -= size 1401 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1402 } 1403 i-- 1404 dAtA[i] = 0x22 1405 } 1406 return len(dAtA) - i, nil 1407 } 1408 func (m *LogtailResponse_Error) MarshalTo(dAtA []byte) (int, error) { 1409 size := m.ProtoSize() 1410 return m.MarshalToSizedBuffer(dAtA[:size]) 1411 } 1412 1413 func (m *LogtailResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1414 i := len(dAtA) 1415 if m.Error != nil { 1416 { 1417 size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) 1418 if err != nil { 1419 return 0, err 1420 } 1421 i -= size 1422 i = encodeVarintLogtail(dAtA, i, uint64(size)) 1423 } 1424 i-- 1425 dAtA[i] = 0x2a 1426 } 1427 return len(dAtA) - i, nil 1428 } 1429 func (m *MessageSegment) Marshal() (dAtA []byte, err error) { 1430 size := m.ProtoSize() 1431 dAtA = make([]byte, size) 1432 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1433 if err != nil { 1434 return nil, err 1435 } 1436 return dAtA[:n], nil 1437 } 1438 1439 func (m *MessageSegment) MarshalTo(dAtA []byte) (int, error) { 1440 size := m.ProtoSize() 1441 return m.MarshalToSizedBuffer(dAtA[:size]) 1442 } 1443 1444 func (m *MessageSegment) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1445 i := len(dAtA) 1446 _ = i 1447 var l int 1448 _ = l 1449 if m.XXX_unrecognized != nil { 1450 i -= len(m.XXX_unrecognized) 1451 copy(dAtA[i:], m.XXX_unrecognized) 1452 } 1453 if len(m.Payload) > 0 { 1454 i -= len(m.Payload) 1455 copy(dAtA[i:], m.Payload) 1456 i = encodeVarintLogtail(dAtA, i, uint64(len(m.Payload))) 1457 i-- 1458 dAtA[i] = 0x2a 1459 } 1460 if m.MaxSequence != 0 { 1461 i = encodeVarintLogtail(dAtA, i, uint64(m.MaxSequence)) 1462 i-- 1463 dAtA[i] = 0x20 1464 } 1465 if m.Sequence != 0 { 1466 i = encodeVarintLogtail(dAtA, i, uint64(m.Sequence)) 1467 i-- 1468 dAtA[i] = 0x18 1469 } 1470 if m.MessageSize != 0 { 1471 i = encodeVarintLogtail(dAtA, i, uint64(m.MessageSize)) 1472 i-- 1473 dAtA[i] = 0x10 1474 } 1475 if m.StreamID != 0 { 1476 i = encodeVarintLogtail(dAtA, i, uint64(m.StreamID)) 1477 i-- 1478 dAtA[i] = 0x8 1479 } 1480 return len(dAtA) - i, nil 1481 } 1482 1483 func encodeVarintLogtail(dAtA []byte, offset int, v uint64) int { 1484 offset -= sovLogtail(v) 1485 base := offset 1486 for v >= 1<<7 { 1487 dAtA[offset] = uint8(v&0x7f | 0x80) 1488 v >>= 7 1489 offset++ 1490 } 1491 dAtA[offset] = uint8(v) 1492 return base 1493 } 1494 func (m *SubscribeRequest) ProtoSize() (n int) { 1495 if m == nil { 1496 return 0 1497 } 1498 var l int 1499 _ = l 1500 if m.Table != nil { 1501 l = m.Table.ProtoSize() 1502 n += 1 + l + sovLogtail(uint64(l)) 1503 } 1504 if m.XXX_unrecognized != nil { 1505 n += len(m.XXX_unrecognized) 1506 } 1507 return n 1508 } 1509 1510 func (m *UnsubscribeRequest) ProtoSize() (n int) { 1511 if m == nil { 1512 return 0 1513 } 1514 var l int 1515 _ = l 1516 if m.Table != nil { 1517 l = m.Table.ProtoSize() 1518 n += 1 + l + sovLogtail(uint64(l)) 1519 } 1520 if m.XXX_unrecognized != nil { 1521 n += len(m.XXX_unrecognized) 1522 } 1523 return n 1524 } 1525 1526 func (m *TableLogtail) ProtoSize() (n int) { 1527 if m == nil { 1528 return 0 1529 } 1530 var l int 1531 _ = l 1532 l = len(m.CkpLocation) 1533 if l > 0 { 1534 n += 1 + l + sovLogtail(uint64(l)) 1535 } 1536 if m.Ts != nil { 1537 l = m.Ts.ProtoSize() 1538 n += 1 + l + sovLogtail(uint64(l)) 1539 } 1540 if m.Table != nil { 1541 l = m.Table.ProtoSize() 1542 n += 1 + l + sovLogtail(uint64(l)) 1543 } 1544 if len(m.Commands) > 0 { 1545 for _, e := range m.Commands { 1546 l = e.ProtoSize() 1547 n += 1 + l + sovLogtail(uint64(l)) 1548 } 1549 } 1550 if m.XXX_unrecognized != nil { 1551 n += len(m.XXX_unrecognized) 1552 } 1553 return n 1554 } 1555 1556 func (m *Status) ProtoSize() (n int) { 1557 if m == nil { 1558 return 0 1559 } 1560 var l int 1561 _ = l 1562 if m.Code != 0 { 1563 n += 1 + sovLogtail(uint64(m.Code)) 1564 } 1565 l = len(m.Message) 1566 if l > 0 { 1567 n += 1 + l + sovLogtail(uint64(l)) 1568 } 1569 if m.XXX_unrecognized != nil { 1570 n += len(m.XXX_unrecognized) 1571 } 1572 return n 1573 } 1574 1575 func (m *ErrorResponse) ProtoSize() (n int) { 1576 if m == nil { 1577 return 0 1578 } 1579 var l int 1580 _ = l 1581 l = m.Status.ProtoSize() 1582 n += 1 + l + sovLogtail(uint64(l)) 1583 if m.Table != nil { 1584 l = m.Table.ProtoSize() 1585 n += 1 + l + sovLogtail(uint64(l)) 1586 } 1587 if m.XXX_unrecognized != nil { 1588 n += len(m.XXX_unrecognized) 1589 } 1590 return n 1591 } 1592 1593 func (m *SubscribeResponse) ProtoSize() (n int) { 1594 if m == nil { 1595 return 0 1596 } 1597 var l int 1598 _ = l 1599 l = m.Logtail.ProtoSize() 1600 n += 1 + l + sovLogtail(uint64(l)) 1601 if m.XXX_unrecognized != nil { 1602 n += len(m.XXX_unrecognized) 1603 } 1604 return n 1605 } 1606 1607 func (m *UpdateResponse) ProtoSize() (n int) { 1608 if m == nil { 1609 return 0 1610 } 1611 var l int 1612 _ = l 1613 if m.From != nil { 1614 l = m.From.ProtoSize() 1615 n += 1 + l + sovLogtail(uint64(l)) 1616 } 1617 if m.To != nil { 1618 l = m.To.ProtoSize() 1619 n += 1 + l + sovLogtail(uint64(l)) 1620 } 1621 if len(m.LogtailList) > 0 { 1622 for _, e := range m.LogtailList { 1623 l = e.ProtoSize() 1624 n += 1 + l + sovLogtail(uint64(l)) 1625 } 1626 } 1627 if m.XXX_unrecognized != nil { 1628 n += len(m.XXX_unrecognized) 1629 } 1630 return n 1631 } 1632 1633 func (m *UnSubscribeResponse) ProtoSize() (n int) { 1634 if m == nil { 1635 return 0 1636 } 1637 var l int 1638 _ = l 1639 if m.Table != nil { 1640 l = m.Table.ProtoSize() 1641 n += 1 + l + sovLogtail(uint64(l)) 1642 } 1643 if m.XXX_unrecognized != nil { 1644 n += len(m.XXX_unrecognized) 1645 } 1646 return n 1647 } 1648 1649 func (m *LogtailRequest) ProtoSize() (n int) { 1650 if m == nil { 1651 return 0 1652 } 1653 var l int 1654 _ = l 1655 if m.RequestId != 0 { 1656 n += 1 + sovLogtail(uint64(m.RequestId)) 1657 } 1658 if m.Request != nil { 1659 n += m.Request.ProtoSize() 1660 } 1661 if m.XXX_unrecognized != nil { 1662 n += len(m.XXX_unrecognized) 1663 } 1664 return n 1665 } 1666 1667 func (m *LogtailRequest_SubscribeTable) ProtoSize() (n int) { 1668 if m == nil { 1669 return 0 1670 } 1671 var l int 1672 _ = l 1673 if m.SubscribeTable != nil { 1674 l = m.SubscribeTable.ProtoSize() 1675 n += 1 + l + sovLogtail(uint64(l)) 1676 } 1677 return n 1678 } 1679 func (m *LogtailRequest_UnsubscribeTable) ProtoSize() (n int) { 1680 if m == nil { 1681 return 0 1682 } 1683 var l int 1684 _ = l 1685 if m.UnsubscribeTable != nil { 1686 l = m.UnsubscribeTable.ProtoSize() 1687 n += 1 + l + sovLogtail(uint64(l)) 1688 } 1689 return n 1690 } 1691 func (m *LogtailResponse) ProtoSize() (n int) { 1692 if m == nil { 1693 return 0 1694 } 1695 var l int 1696 _ = l 1697 if m.ResponseId != 0 { 1698 n += 1 + sovLogtail(uint64(m.ResponseId)) 1699 } 1700 if m.Response != nil { 1701 n += m.Response.ProtoSize() 1702 } 1703 if m.XXX_unrecognized != nil { 1704 n += len(m.XXX_unrecognized) 1705 } 1706 return n 1707 } 1708 1709 func (m *LogtailResponse_SubscribeResponse) ProtoSize() (n int) { 1710 if m == nil { 1711 return 0 1712 } 1713 var l int 1714 _ = l 1715 if m.SubscribeResponse != nil { 1716 l = m.SubscribeResponse.ProtoSize() 1717 n += 1 + l + sovLogtail(uint64(l)) 1718 } 1719 return n 1720 } 1721 func (m *LogtailResponse_UnsubscribeResponse) ProtoSize() (n int) { 1722 if m == nil { 1723 return 0 1724 } 1725 var l int 1726 _ = l 1727 if m.UnsubscribeResponse != nil { 1728 l = m.UnsubscribeResponse.ProtoSize() 1729 n += 1 + l + sovLogtail(uint64(l)) 1730 } 1731 return n 1732 } 1733 func (m *LogtailResponse_UpdateResponse) ProtoSize() (n int) { 1734 if m == nil { 1735 return 0 1736 } 1737 var l int 1738 _ = l 1739 if m.UpdateResponse != nil { 1740 l = m.UpdateResponse.ProtoSize() 1741 n += 1 + l + sovLogtail(uint64(l)) 1742 } 1743 return n 1744 } 1745 func (m *LogtailResponse_Error) ProtoSize() (n int) { 1746 if m == nil { 1747 return 0 1748 } 1749 var l int 1750 _ = l 1751 if m.Error != nil { 1752 l = m.Error.ProtoSize() 1753 n += 1 + l + sovLogtail(uint64(l)) 1754 } 1755 return n 1756 } 1757 func (m *MessageSegment) ProtoSize() (n int) { 1758 if m == nil { 1759 return 0 1760 } 1761 var l int 1762 _ = l 1763 if m.StreamID != 0 { 1764 n += 1 + sovLogtail(uint64(m.StreamID)) 1765 } 1766 if m.MessageSize != 0 { 1767 n += 1 + sovLogtail(uint64(m.MessageSize)) 1768 } 1769 if m.Sequence != 0 { 1770 n += 1 + sovLogtail(uint64(m.Sequence)) 1771 } 1772 if m.MaxSequence != 0 { 1773 n += 1 + sovLogtail(uint64(m.MaxSequence)) 1774 } 1775 l = len(m.Payload) 1776 if l > 0 { 1777 n += 1 + l + sovLogtail(uint64(l)) 1778 } 1779 if m.XXX_unrecognized != nil { 1780 n += len(m.XXX_unrecognized) 1781 } 1782 return n 1783 } 1784 1785 func sovLogtail(x uint64) (n int) { 1786 return (math_bits.Len64(x|1) + 6) / 7 1787 } 1788 func sozLogtail(x uint64) (n int) { 1789 return sovLogtail(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1790 } 1791 func (m *SubscribeRequest) Unmarshal(dAtA []byte) error { 1792 l := len(dAtA) 1793 iNdEx := 0 1794 for iNdEx < l { 1795 preIndex := iNdEx 1796 var wire uint64 1797 for shift := uint(0); ; shift += 7 { 1798 if shift >= 64 { 1799 return ErrIntOverflowLogtail 1800 } 1801 if iNdEx >= l { 1802 return io.ErrUnexpectedEOF 1803 } 1804 b := dAtA[iNdEx] 1805 iNdEx++ 1806 wire |= uint64(b&0x7F) << shift 1807 if b < 0x80 { 1808 break 1809 } 1810 } 1811 fieldNum := int32(wire >> 3) 1812 wireType := int(wire & 0x7) 1813 if wireType == 4 { 1814 return fmt.Errorf("proto: SubscribeRequest: wiretype end group for non-group") 1815 } 1816 if fieldNum <= 0 { 1817 return fmt.Errorf("proto: SubscribeRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1818 } 1819 switch fieldNum { 1820 case 1: 1821 if wireType != 2 { 1822 return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) 1823 } 1824 var msglen int 1825 for shift := uint(0); ; shift += 7 { 1826 if shift >= 64 { 1827 return ErrIntOverflowLogtail 1828 } 1829 if iNdEx >= l { 1830 return io.ErrUnexpectedEOF 1831 } 1832 b := dAtA[iNdEx] 1833 iNdEx++ 1834 msglen |= int(b&0x7F) << shift 1835 if b < 0x80 { 1836 break 1837 } 1838 } 1839 if msglen < 0 { 1840 return ErrInvalidLengthLogtail 1841 } 1842 postIndex := iNdEx + msglen 1843 if postIndex < 0 { 1844 return ErrInvalidLengthLogtail 1845 } 1846 if postIndex > l { 1847 return io.ErrUnexpectedEOF 1848 } 1849 if m.Table == nil { 1850 m.Table = &api.TableID{} 1851 } 1852 if err := m.Table.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1853 return err 1854 } 1855 iNdEx = postIndex 1856 default: 1857 iNdEx = preIndex 1858 skippy, err := skipLogtail(dAtA[iNdEx:]) 1859 if err != nil { 1860 return err 1861 } 1862 if (skippy < 0) || (iNdEx+skippy) < 0 { 1863 return ErrInvalidLengthLogtail 1864 } 1865 if (iNdEx + skippy) > l { 1866 return io.ErrUnexpectedEOF 1867 } 1868 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1869 iNdEx += skippy 1870 } 1871 } 1872 1873 if iNdEx > l { 1874 return io.ErrUnexpectedEOF 1875 } 1876 return nil 1877 } 1878 func (m *UnsubscribeRequest) Unmarshal(dAtA []byte) error { 1879 l := len(dAtA) 1880 iNdEx := 0 1881 for iNdEx < l { 1882 preIndex := iNdEx 1883 var wire uint64 1884 for shift := uint(0); ; shift += 7 { 1885 if shift >= 64 { 1886 return ErrIntOverflowLogtail 1887 } 1888 if iNdEx >= l { 1889 return io.ErrUnexpectedEOF 1890 } 1891 b := dAtA[iNdEx] 1892 iNdEx++ 1893 wire |= uint64(b&0x7F) << shift 1894 if b < 0x80 { 1895 break 1896 } 1897 } 1898 fieldNum := int32(wire >> 3) 1899 wireType := int(wire & 0x7) 1900 if wireType == 4 { 1901 return fmt.Errorf("proto: UnsubscribeRequest: wiretype end group for non-group") 1902 } 1903 if fieldNum <= 0 { 1904 return fmt.Errorf("proto: UnsubscribeRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1905 } 1906 switch fieldNum { 1907 case 1: 1908 if wireType != 2 { 1909 return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) 1910 } 1911 var msglen int 1912 for shift := uint(0); ; shift += 7 { 1913 if shift >= 64 { 1914 return ErrIntOverflowLogtail 1915 } 1916 if iNdEx >= l { 1917 return io.ErrUnexpectedEOF 1918 } 1919 b := dAtA[iNdEx] 1920 iNdEx++ 1921 msglen |= int(b&0x7F) << shift 1922 if b < 0x80 { 1923 break 1924 } 1925 } 1926 if msglen < 0 { 1927 return ErrInvalidLengthLogtail 1928 } 1929 postIndex := iNdEx + msglen 1930 if postIndex < 0 { 1931 return ErrInvalidLengthLogtail 1932 } 1933 if postIndex > l { 1934 return io.ErrUnexpectedEOF 1935 } 1936 if m.Table == nil { 1937 m.Table = &api.TableID{} 1938 } 1939 if err := m.Table.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1940 return err 1941 } 1942 iNdEx = postIndex 1943 default: 1944 iNdEx = preIndex 1945 skippy, err := skipLogtail(dAtA[iNdEx:]) 1946 if err != nil { 1947 return err 1948 } 1949 if (skippy < 0) || (iNdEx+skippy) < 0 { 1950 return ErrInvalidLengthLogtail 1951 } 1952 if (iNdEx + skippy) > l { 1953 return io.ErrUnexpectedEOF 1954 } 1955 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 1956 iNdEx += skippy 1957 } 1958 } 1959 1960 if iNdEx > l { 1961 return io.ErrUnexpectedEOF 1962 } 1963 return nil 1964 } 1965 func (m *TableLogtail) Unmarshal(dAtA []byte) error { 1966 l := len(dAtA) 1967 iNdEx := 0 1968 for iNdEx < l { 1969 preIndex := iNdEx 1970 var wire uint64 1971 for shift := uint(0); ; shift += 7 { 1972 if shift >= 64 { 1973 return ErrIntOverflowLogtail 1974 } 1975 if iNdEx >= l { 1976 return io.ErrUnexpectedEOF 1977 } 1978 b := dAtA[iNdEx] 1979 iNdEx++ 1980 wire |= uint64(b&0x7F) << shift 1981 if b < 0x80 { 1982 break 1983 } 1984 } 1985 fieldNum := int32(wire >> 3) 1986 wireType := int(wire & 0x7) 1987 if wireType == 4 { 1988 return fmt.Errorf("proto: TableLogtail: wiretype end group for non-group") 1989 } 1990 if fieldNum <= 0 { 1991 return fmt.Errorf("proto: TableLogtail: illegal tag %d (wire type %d)", fieldNum, wire) 1992 } 1993 switch fieldNum { 1994 case 1: 1995 if wireType != 2 { 1996 return fmt.Errorf("proto: wrong wireType = %d for field CkpLocation", wireType) 1997 } 1998 var stringLen uint64 1999 for shift := uint(0); ; shift += 7 { 2000 if shift >= 64 { 2001 return ErrIntOverflowLogtail 2002 } 2003 if iNdEx >= l { 2004 return io.ErrUnexpectedEOF 2005 } 2006 b := dAtA[iNdEx] 2007 iNdEx++ 2008 stringLen |= uint64(b&0x7F) << shift 2009 if b < 0x80 { 2010 break 2011 } 2012 } 2013 intStringLen := int(stringLen) 2014 if intStringLen < 0 { 2015 return ErrInvalidLengthLogtail 2016 } 2017 postIndex := iNdEx + intStringLen 2018 if postIndex < 0 { 2019 return ErrInvalidLengthLogtail 2020 } 2021 if postIndex > l { 2022 return io.ErrUnexpectedEOF 2023 } 2024 m.CkpLocation = string(dAtA[iNdEx:postIndex]) 2025 iNdEx = postIndex 2026 case 2: 2027 if wireType != 2 { 2028 return fmt.Errorf("proto: wrong wireType = %d for field Ts", wireType) 2029 } 2030 var msglen int 2031 for shift := uint(0); ; shift += 7 { 2032 if shift >= 64 { 2033 return ErrIntOverflowLogtail 2034 } 2035 if iNdEx >= l { 2036 return io.ErrUnexpectedEOF 2037 } 2038 b := dAtA[iNdEx] 2039 iNdEx++ 2040 msglen |= int(b&0x7F) << shift 2041 if b < 0x80 { 2042 break 2043 } 2044 } 2045 if msglen < 0 { 2046 return ErrInvalidLengthLogtail 2047 } 2048 postIndex := iNdEx + msglen 2049 if postIndex < 0 { 2050 return ErrInvalidLengthLogtail 2051 } 2052 if postIndex > l { 2053 return io.ErrUnexpectedEOF 2054 } 2055 if m.Ts == nil { 2056 m.Ts = ×tamp.Timestamp{} 2057 } 2058 if err := m.Ts.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2059 return err 2060 } 2061 iNdEx = postIndex 2062 case 3: 2063 if wireType != 2 { 2064 return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) 2065 } 2066 var msglen int 2067 for shift := uint(0); ; shift += 7 { 2068 if shift >= 64 { 2069 return ErrIntOverflowLogtail 2070 } 2071 if iNdEx >= l { 2072 return io.ErrUnexpectedEOF 2073 } 2074 b := dAtA[iNdEx] 2075 iNdEx++ 2076 msglen |= int(b&0x7F) << shift 2077 if b < 0x80 { 2078 break 2079 } 2080 } 2081 if msglen < 0 { 2082 return ErrInvalidLengthLogtail 2083 } 2084 postIndex := iNdEx + msglen 2085 if postIndex < 0 { 2086 return ErrInvalidLengthLogtail 2087 } 2088 if postIndex > l { 2089 return io.ErrUnexpectedEOF 2090 } 2091 if m.Table == nil { 2092 m.Table = &api.TableID{} 2093 } 2094 if err := m.Table.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2095 return err 2096 } 2097 iNdEx = postIndex 2098 case 4: 2099 if wireType != 2 { 2100 return fmt.Errorf("proto: wrong wireType = %d for field Commands", wireType) 2101 } 2102 var msglen int 2103 for shift := uint(0); ; shift += 7 { 2104 if shift >= 64 { 2105 return ErrIntOverflowLogtail 2106 } 2107 if iNdEx >= l { 2108 return io.ErrUnexpectedEOF 2109 } 2110 b := dAtA[iNdEx] 2111 iNdEx++ 2112 msglen |= int(b&0x7F) << shift 2113 if b < 0x80 { 2114 break 2115 } 2116 } 2117 if msglen < 0 { 2118 return ErrInvalidLengthLogtail 2119 } 2120 postIndex := iNdEx + msglen 2121 if postIndex < 0 { 2122 return ErrInvalidLengthLogtail 2123 } 2124 if postIndex > l { 2125 return io.ErrUnexpectedEOF 2126 } 2127 m.Commands = append(m.Commands, api.Entry{}) 2128 if err := m.Commands[len(m.Commands)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2129 return err 2130 } 2131 iNdEx = postIndex 2132 default: 2133 iNdEx = preIndex 2134 skippy, err := skipLogtail(dAtA[iNdEx:]) 2135 if err != nil { 2136 return err 2137 } 2138 if (skippy < 0) || (iNdEx+skippy) < 0 { 2139 return ErrInvalidLengthLogtail 2140 } 2141 if (iNdEx + skippy) > l { 2142 return io.ErrUnexpectedEOF 2143 } 2144 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2145 iNdEx += skippy 2146 } 2147 } 2148 2149 if iNdEx > l { 2150 return io.ErrUnexpectedEOF 2151 } 2152 return nil 2153 } 2154 func (m *Status) Unmarshal(dAtA []byte) error { 2155 l := len(dAtA) 2156 iNdEx := 0 2157 for iNdEx < l { 2158 preIndex := iNdEx 2159 var wire uint64 2160 for shift := uint(0); ; shift += 7 { 2161 if shift >= 64 { 2162 return ErrIntOverflowLogtail 2163 } 2164 if iNdEx >= l { 2165 return io.ErrUnexpectedEOF 2166 } 2167 b := dAtA[iNdEx] 2168 iNdEx++ 2169 wire |= uint64(b&0x7F) << shift 2170 if b < 0x80 { 2171 break 2172 } 2173 } 2174 fieldNum := int32(wire >> 3) 2175 wireType := int(wire & 0x7) 2176 if wireType == 4 { 2177 return fmt.Errorf("proto: Status: wiretype end group for non-group") 2178 } 2179 if fieldNum <= 0 { 2180 return fmt.Errorf("proto: Status: illegal tag %d (wire type %d)", fieldNum, wire) 2181 } 2182 switch fieldNum { 2183 case 1: 2184 if wireType != 0 { 2185 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) 2186 } 2187 m.Code = 0 2188 for shift := uint(0); ; shift += 7 { 2189 if shift >= 64 { 2190 return ErrIntOverflowLogtail 2191 } 2192 if iNdEx >= l { 2193 return io.ErrUnexpectedEOF 2194 } 2195 b := dAtA[iNdEx] 2196 iNdEx++ 2197 m.Code |= uint32(b&0x7F) << shift 2198 if b < 0x80 { 2199 break 2200 } 2201 } 2202 case 2: 2203 if wireType != 2 { 2204 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) 2205 } 2206 var stringLen uint64 2207 for shift := uint(0); ; shift += 7 { 2208 if shift >= 64 { 2209 return ErrIntOverflowLogtail 2210 } 2211 if iNdEx >= l { 2212 return io.ErrUnexpectedEOF 2213 } 2214 b := dAtA[iNdEx] 2215 iNdEx++ 2216 stringLen |= uint64(b&0x7F) << shift 2217 if b < 0x80 { 2218 break 2219 } 2220 } 2221 intStringLen := int(stringLen) 2222 if intStringLen < 0 { 2223 return ErrInvalidLengthLogtail 2224 } 2225 postIndex := iNdEx + intStringLen 2226 if postIndex < 0 { 2227 return ErrInvalidLengthLogtail 2228 } 2229 if postIndex > l { 2230 return io.ErrUnexpectedEOF 2231 } 2232 m.Message = string(dAtA[iNdEx:postIndex]) 2233 iNdEx = postIndex 2234 default: 2235 iNdEx = preIndex 2236 skippy, err := skipLogtail(dAtA[iNdEx:]) 2237 if err != nil { 2238 return err 2239 } 2240 if (skippy < 0) || (iNdEx+skippy) < 0 { 2241 return ErrInvalidLengthLogtail 2242 } 2243 if (iNdEx + skippy) > l { 2244 return io.ErrUnexpectedEOF 2245 } 2246 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2247 iNdEx += skippy 2248 } 2249 } 2250 2251 if iNdEx > l { 2252 return io.ErrUnexpectedEOF 2253 } 2254 return nil 2255 } 2256 func (m *ErrorResponse) Unmarshal(dAtA []byte) error { 2257 l := len(dAtA) 2258 iNdEx := 0 2259 for iNdEx < l { 2260 preIndex := iNdEx 2261 var wire uint64 2262 for shift := uint(0); ; shift += 7 { 2263 if shift >= 64 { 2264 return ErrIntOverflowLogtail 2265 } 2266 if iNdEx >= l { 2267 return io.ErrUnexpectedEOF 2268 } 2269 b := dAtA[iNdEx] 2270 iNdEx++ 2271 wire |= uint64(b&0x7F) << shift 2272 if b < 0x80 { 2273 break 2274 } 2275 } 2276 fieldNum := int32(wire >> 3) 2277 wireType := int(wire & 0x7) 2278 if wireType == 4 { 2279 return fmt.Errorf("proto: ErrorResponse: wiretype end group for non-group") 2280 } 2281 if fieldNum <= 0 { 2282 return fmt.Errorf("proto: ErrorResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2283 } 2284 switch fieldNum { 2285 case 1: 2286 if wireType != 2 { 2287 return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) 2288 } 2289 var msglen int 2290 for shift := uint(0); ; shift += 7 { 2291 if shift >= 64 { 2292 return ErrIntOverflowLogtail 2293 } 2294 if iNdEx >= l { 2295 return io.ErrUnexpectedEOF 2296 } 2297 b := dAtA[iNdEx] 2298 iNdEx++ 2299 msglen |= int(b&0x7F) << shift 2300 if b < 0x80 { 2301 break 2302 } 2303 } 2304 if msglen < 0 { 2305 return ErrInvalidLengthLogtail 2306 } 2307 postIndex := iNdEx + msglen 2308 if postIndex < 0 { 2309 return ErrInvalidLengthLogtail 2310 } 2311 if postIndex > l { 2312 return io.ErrUnexpectedEOF 2313 } 2314 if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2315 return err 2316 } 2317 iNdEx = postIndex 2318 case 2: 2319 if wireType != 2 { 2320 return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) 2321 } 2322 var msglen int 2323 for shift := uint(0); ; shift += 7 { 2324 if shift >= 64 { 2325 return ErrIntOverflowLogtail 2326 } 2327 if iNdEx >= l { 2328 return io.ErrUnexpectedEOF 2329 } 2330 b := dAtA[iNdEx] 2331 iNdEx++ 2332 msglen |= int(b&0x7F) << shift 2333 if b < 0x80 { 2334 break 2335 } 2336 } 2337 if msglen < 0 { 2338 return ErrInvalidLengthLogtail 2339 } 2340 postIndex := iNdEx + msglen 2341 if postIndex < 0 { 2342 return ErrInvalidLengthLogtail 2343 } 2344 if postIndex > l { 2345 return io.ErrUnexpectedEOF 2346 } 2347 if m.Table == nil { 2348 m.Table = &api.TableID{} 2349 } 2350 if err := m.Table.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2351 return err 2352 } 2353 iNdEx = postIndex 2354 default: 2355 iNdEx = preIndex 2356 skippy, err := skipLogtail(dAtA[iNdEx:]) 2357 if err != nil { 2358 return err 2359 } 2360 if (skippy < 0) || (iNdEx+skippy) < 0 { 2361 return ErrInvalidLengthLogtail 2362 } 2363 if (iNdEx + skippy) > l { 2364 return io.ErrUnexpectedEOF 2365 } 2366 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2367 iNdEx += skippy 2368 } 2369 } 2370 2371 if iNdEx > l { 2372 return io.ErrUnexpectedEOF 2373 } 2374 return nil 2375 } 2376 func (m *SubscribeResponse) Unmarshal(dAtA []byte) error { 2377 l := len(dAtA) 2378 iNdEx := 0 2379 for iNdEx < l { 2380 preIndex := iNdEx 2381 var wire uint64 2382 for shift := uint(0); ; shift += 7 { 2383 if shift >= 64 { 2384 return ErrIntOverflowLogtail 2385 } 2386 if iNdEx >= l { 2387 return io.ErrUnexpectedEOF 2388 } 2389 b := dAtA[iNdEx] 2390 iNdEx++ 2391 wire |= uint64(b&0x7F) << shift 2392 if b < 0x80 { 2393 break 2394 } 2395 } 2396 fieldNum := int32(wire >> 3) 2397 wireType := int(wire & 0x7) 2398 if wireType == 4 { 2399 return fmt.Errorf("proto: SubscribeResponse: wiretype end group for non-group") 2400 } 2401 if fieldNum <= 0 { 2402 return fmt.Errorf("proto: SubscribeResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2403 } 2404 switch fieldNum { 2405 case 1: 2406 if wireType != 2 { 2407 return fmt.Errorf("proto: wrong wireType = %d for field Logtail", wireType) 2408 } 2409 var msglen int 2410 for shift := uint(0); ; shift += 7 { 2411 if shift >= 64 { 2412 return ErrIntOverflowLogtail 2413 } 2414 if iNdEx >= l { 2415 return io.ErrUnexpectedEOF 2416 } 2417 b := dAtA[iNdEx] 2418 iNdEx++ 2419 msglen |= int(b&0x7F) << shift 2420 if b < 0x80 { 2421 break 2422 } 2423 } 2424 if msglen < 0 { 2425 return ErrInvalidLengthLogtail 2426 } 2427 postIndex := iNdEx + msglen 2428 if postIndex < 0 { 2429 return ErrInvalidLengthLogtail 2430 } 2431 if postIndex > l { 2432 return io.ErrUnexpectedEOF 2433 } 2434 if err := m.Logtail.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2435 return err 2436 } 2437 iNdEx = postIndex 2438 default: 2439 iNdEx = preIndex 2440 skippy, err := skipLogtail(dAtA[iNdEx:]) 2441 if err != nil { 2442 return err 2443 } 2444 if (skippy < 0) || (iNdEx+skippy) < 0 { 2445 return ErrInvalidLengthLogtail 2446 } 2447 if (iNdEx + skippy) > l { 2448 return io.ErrUnexpectedEOF 2449 } 2450 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2451 iNdEx += skippy 2452 } 2453 } 2454 2455 if iNdEx > l { 2456 return io.ErrUnexpectedEOF 2457 } 2458 return nil 2459 } 2460 func (m *UpdateResponse) Unmarshal(dAtA []byte) error { 2461 l := len(dAtA) 2462 iNdEx := 0 2463 for iNdEx < l { 2464 preIndex := iNdEx 2465 var wire uint64 2466 for shift := uint(0); ; shift += 7 { 2467 if shift >= 64 { 2468 return ErrIntOverflowLogtail 2469 } 2470 if iNdEx >= l { 2471 return io.ErrUnexpectedEOF 2472 } 2473 b := dAtA[iNdEx] 2474 iNdEx++ 2475 wire |= uint64(b&0x7F) << shift 2476 if b < 0x80 { 2477 break 2478 } 2479 } 2480 fieldNum := int32(wire >> 3) 2481 wireType := int(wire & 0x7) 2482 if wireType == 4 { 2483 return fmt.Errorf("proto: UpdateResponse: wiretype end group for non-group") 2484 } 2485 if fieldNum <= 0 { 2486 return fmt.Errorf("proto: UpdateResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2487 } 2488 switch fieldNum { 2489 case 1: 2490 if wireType != 2 { 2491 return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) 2492 } 2493 var msglen int 2494 for shift := uint(0); ; shift += 7 { 2495 if shift >= 64 { 2496 return ErrIntOverflowLogtail 2497 } 2498 if iNdEx >= l { 2499 return io.ErrUnexpectedEOF 2500 } 2501 b := dAtA[iNdEx] 2502 iNdEx++ 2503 msglen |= int(b&0x7F) << shift 2504 if b < 0x80 { 2505 break 2506 } 2507 } 2508 if msglen < 0 { 2509 return ErrInvalidLengthLogtail 2510 } 2511 postIndex := iNdEx + msglen 2512 if postIndex < 0 { 2513 return ErrInvalidLengthLogtail 2514 } 2515 if postIndex > l { 2516 return io.ErrUnexpectedEOF 2517 } 2518 if m.From == nil { 2519 m.From = ×tamp.Timestamp{} 2520 } 2521 if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2522 return err 2523 } 2524 iNdEx = postIndex 2525 case 2: 2526 if wireType != 2 { 2527 return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) 2528 } 2529 var msglen int 2530 for shift := uint(0); ; shift += 7 { 2531 if shift >= 64 { 2532 return ErrIntOverflowLogtail 2533 } 2534 if iNdEx >= l { 2535 return io.ErrUnexpectedEOF 2536 } 2537 b := dAtA[iNdEx] 2538 iNdEx++ 2539 msglen |= int(b&0x7F) << shift 2540 if b < 0x80 { 2541 break 2542 } 2543 } 2544 if msglen < 0 { 2545 return ErrInvalidLengthLogtail 2546 } 2547 postIndex := iNdEx + msglen 2548 if postIndex < 0 { 2549 return ErrInvalidLengthLogtail 2550 } 2551 if postIndex > l { 2552 return io.ErrUnexpectedEOF 2553 } 2554 if m.To == nil { 2555 m.To = ×tamp.Timestamp{} 2556 } 2557 if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2558 return err 2559 } 2560 iNdEx = postIndex 2561 case 3: 2562 if wireType != 2 { 2563 return fmt.Errorf("proto: wrong wireType = %d for field LogtailList", wireType) 2564 } 2565 var msglen int 2566 for shift := uint(0); ; shift += 7 { 2567 if shift >= 64 { 2568 return ErrIntOverflowLogtail 2569 } 2570 if iNdEx >= l { 2571 return io.ErrUnexpectedEOF 2572 } 2573 b := dAtA[iNdEx] 2574 iNdEx++ 2575 msglen |= int(b&0x7F) << shift 2576 if b < 0x80 { 2577 break 2578 } 2579 } 2580 if msglen < 0 { 2581 return ErrInvalidLengthLogtail 2582 } 2583 postIndex := iNdEx + msglen 2584 if postIndex < 0 { 2585 return ErrInvalidLengthLogtail 2586 } 2587 if postIndex > l { 2588 return io.ErrUnexpectedEOF 2589 } 2590 m.LogtailList = append(m.LogtailList, TableLogtail{}) 2591 if err := m.LogtailList[len(m.LogtailList)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2592 return err 2593 } 2594 iNdEx = postIndex 2595 default: 2596 iNdEx = preIndex 2597 skippy, err := skipLogtail(dAtA[iNdEx:]) 2598 if err != nil { 2599 return err 2600 } 2601 if (skippy < 0) || (iNdEx+skippy) < 0 { 2602 return ErrInvalidLengthLogtail 2603 } 2604 if (iNdEx + skippy) > l { 2605 return io.ErrUnexpectedEOF 2606 } 2607 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2608 iNdEx += skippy 2609 } 2610 } 2611 2612 if iNdEx > l { 2613 return io.ErrUnexpectedEOF 2614 } 2615 return nil 2616 } 2617 func (m *UnSubscribeResponse) Unmarshal(dAtA []byte) error { 2618 l := len(dAtA) 2619 iNdEx := 0 2620 for iNdEx < l { 2621 preIndex := iNdEx 2622 var wire uint64 2623 for shift := uint(0); ; shift += 7 { 2624 if shift >= 64 { 2625 return ErrIntOverflowLogtail 2626 } 2627 if iNdEx >= l { 2628 return io.ErrUnexpectedEOF 2629 } 2630 b := dAtA[iNdEx] 2631 iNdEx++ 2632 wire |= uint64(b&0x7F) << shift 2633 if b < 0x80 { 2634 break 2635 } 2636 } 2637 fieldNum := int32(wire >> 3) 2638 wireType := int(wire & 0x7) 2639 if wireType == 4 { 2640 return fmt.Errorf("proto: UnSubscribeResponse: wiretype end group for non-group") 2641 } 2642 if fieldNum <= 0 { 2643 return fmt.Errorf("proto: UnSubscribeResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2644 } 2645 switch fieldNum { 2646 case 1: 2647 if wireType != 2 { 2648 return fmt.Errorf("proto: wrong wireType = %d for field Table", wireType) 2649 } 2650 var msglen int 2651 for shift := uint(0); ; shift += 7 { 2652 if shift >= 64 { 2653 return ErrIntOverflowLogtail 2654 } 2655 if iNdEx >= l { 2656 return io.ErrUnexpectedEOF 2657 } 2658 b := dAtA[iNdEx] 2659 iNdEx++ 2660 msglen |= int(b&0x7F) << shift 2661 if b < 0x80 { 2662 break 2663 } 2664 } 2665 if msglen < 0 { 2666 return ErrInvalidLengthLogtail 2667 } 2668 postIndex := iNdEx + msglen 2669 if postIndex < 0 { 2670 return ErrInvalidLengthLogtail 2671 } 2672 if postIndex > l { 2673 return io.ErrUnexpectedEOF 2674 } 2675 if m.Table == nil { 2676 m.Table = &api.TableID{} 2677 } 2678 if err := m.Table.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2679 return err 2680 } 2681 iNdEx = postIndex 2682 default: 2683 iNdEx = preIndex 2684 skippy, err := skipLogtail(dAtA[iNdEx:]) 2685 if err != nil { 2686 return err 2687 } 2688 if (skippy < 0) || (iNdEx+skippy) < 0 { 2689 return ErrInvalidLengthLogtail 2690 } 2691 if (iNdEx + skippy) > l { 2692 return io.ErrUnexpectedEOF 2693 } 2694 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2695 iNdEx += skippy 2696 } 2697 } 2698 2699 if iNdEx > l { 2700 return io.ErrUnexpectedEOF 2701 } 2702 return nil 2703 } 2704 func (m *LogtailRequest) Unmarshal(dAtA []byte) error { 2705 l := len(dAtA) 2706 iNdEx := 0 2707 for iNdEx < l { 2708 preIndex := iNdEx 2709 var wire uint64 2710 for shift := uint(0); ; shift += 7 { 2711 if shift >= 64 { 2712 return ErrIntOverflowLogtail 2713 } 2714 if iNdEx >= l { 2715 return io.ErrUnexpectedEOF 2716 } 2717 b := dAtA[iNdEx] 2718 iNdEx++ 2719 wire |= uint64(b&0x7F) << shift 2720 if b < 0x80 { 2721 break 2722 } 2723 } 2724 fieldNum := int32(wire >> 3) 2725 wireType := int(wire & 0x7) 2726 if wireType == 4 { 2727 return fmt.Errorf("proto: LogtailRequest: wiretype end group for non-group") 2728 } 2729 if fieldNum <= 0 { 2730 return fmt.Errorf("proto: LogtailRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2731 } 2732 switch fieldNum { 2733 case 1: 2734 if wireType != 0 { 2735 return fmt.Errorf("proto: wrong wireType = %d for field RequestId", wireType) 2736 } 2737 m.RequestId = 0 2738 for shift := uint(0); ; shift += 7 { 2739 if shift >= 64 { 2740 return ErrIntOverflowLogtail 2741 } 2742 if iNdEx >= l { 2743 return io.ErrUnexpectedEOF 2744 } 2745 b := dAtA[iNdEx] 2746 iNdEx++ 2747 m.RequestId |= uint64(b&0x7F) << shift 2748 if b < 0x80 { 2749 break 2750 } 2751 } 2752 case 2: 2753 if wireType != 2 { 2754 return fmt.Errorf("proto: wrong wireType = %d for field SubscribeTable", wireType) 2755 } 2756 var msglen int 2757 for shift := uint(0); ; shift += 7 { 2758 if shift >= 64 { 2759 return ErrIntOverflowLogtail 2760 } 2761 if iNdEx >= l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 b := dAtA[iNdEx] 2765 iNdEx++ 2766 msglen |= int(b&0x7F) << shift 2767 if b < 0x80 { 2768 break 2769 } 2770 } 2771 if msglen < 0 { 2772 return ErrInvalidLengthLogtail 2773 } 2774 postIndex := iNdEx + msglen 2775 if postIndex < 0 { 2776 return ErrInvalidLengthLogtail 2777 } 2778 if postIndex > l { 2779 return io.ErrUnexpectedEOF 2780 } 2781 v := &SubscribeRequest{} 2782 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2783 return err 2784 } 2785 m.Request = &LogtailRequest_SubscribeTable{v} 2786 iNdEx = postIndex 2787 case 3: 2788 if wireType != 2 { 2789 return fmt.Errorf("proto: wrong wireType = %d for field UnsubscribeTable", wireType) 2790 } 2791 var msglen int 2792 for shift := uint(0); ; shift += 7 { 2793 if shift >= 64 { 2794 return ErrIntOverflowLogtail 2795 } 2796 if iNdEx >= l { 2797 return io.ErrUnexpectedEOF 2798 } 2799 b := dAtA[iNdEx] 2800 iNdEx++ 2801 msglen |= int(b&0x7F) << shift 2802 if b < 0x80 { 2803 break 2804 } 2805 } 2806 if msglen < 0 { 2807 return ErrInvalidLengthLogtail 2808 } 2809 postIndex := iNdEx + msglen 2810 if postIndex < 0 { 2811 return ErrInvalidLengthLogtail 2812 } 2813 if postIndex > l { 2814 return io.ErrUnexpectedEOF 2815 } 2816 v := &UnsubscribeRequest{} 2817 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2818 return err 2819 } 2820 m.Request = &LogtailRequest_UnsubscribeTable{v} 2821 iNdEx = postIndex 2822 default: 2823 iNdEx = preIndex 2824 skippy, err := skipLogtail(dAtA[iNdEx:]) 2825 if err != nil { 2826 return err 2827 } 2828 if (skippy < 0) || (iNdEx+skippy) < 0 { 2829 return ErrInvalidLengthLogtail 2830 } 2831 if (iNdEx + skippy) > l { 2832 return io.ErrUnexpectedEOF 2833 } 2834 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 2835 iNdEx += skippy 2836 } 2837 } 2838 2839 if iNdEx > l { 2840 return io.ErrUnexpectedEOF 2841 } 2842 return nil 2843 } 2844 func (m *LogtailResponse) Unmarshal(dAtA []byte) error { 2845 l := len(dAtA) 2846 iNdEx := 0 2847 for iNdEx < l { 2848 preIndex := iNdEx 2849 var wire uint64 2850 for shift := uint(0); ; shift += 7 { 2851 if shift >= 64 { 2852 return ErrIntOverflowLogtail 2853 } 2854 if iNdEx >= l { 2855 return io.ErrUnexpectedEOF 2856 } 2857 b := dAtA[iNdEx] 2858 iNdEx++ 2859 wire |= uint64(b&0x7F) << shift 2860 if b < 0x80 { 2861 break 2862 } 2863 } 2864 fieldNum := int32(wire >> 3) 2865 wireType := int(wire & 0x7) 2866 if wireType == 4 { 2867 return fmt.Errorf("proto: LogtailResponse: wiretype end group for non-group") 2868 } 2869 if fieldNum <= 0 { 2870 return fmt.Errorf("proto: LogtailResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2871 } 2872 switch fieldNum { 2873 case 1: 2874 if wireType != 0 { 2875 return fmt.Errorf("proto: wrong wireType = %d for field ResponseId", wireType) 2876 } 2877 m.ResponseId = 0 2878 for shift := uint(0); ; shift += 7 { 2879 if shift >= 64 { 2880 return ErrIntOverflowLogtail 2881 } 2882 if iNdEx >= l { 2883 return io.ErrUnexpectedEOF 2884 } 2885 b := dAtA[iNdEx] 2886 iNdEx++ 2887 m.ResponseId |= uint64(b&0x7F) << shift 2888 if b < 0x80 { 2889 break 2890 } 2891 } 2892 case 2: 2893 if wireType != 2 { 2894 return fmt.Errorf("proto: wrong wireType = %d for field SubscribeResponse", wireType) 2895 } 2896 var msglen int 2897 for shift := uint(0); ; shift += 7 { 2898 if shift >= 64 { 2899 return ErrIntOverflowLogtail 2900 } 2901 if iNdEx >= l { 2902 return io.ErrUnexpectedEOF 2903 } 2904 b := dAtA[iNdEx] 2905 iNdEx++ 2906 msglen |= int(b&0x7F) << shift 2907 if b < 0x80 { 2908 break 2909 } 2910 } 2911 if msglen < 0 { 2912 return ErrInvalidLengthLogtail 2913 } 2914 postIndex := iNdEx + msglen 2915 if postIndex < 0 { 2916 return ErrInvalidLengthLogtail 2917 } 2918 if postIndex > l { 2919 return io.ErrUnexpectedEOF 2920 } 2921 v := &SubscribeResponse{} 2922 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2923 return err 2924 } 2925 m.Response = &LogtailResponse_SubscribeResponse{v} 2926 iNdEx = postIndex 2927 case 3: 2928 if wireType != 2 { 2929 return fmt.Errorf("proto: wrong wireType = %d for field UnsubscribeResponse", wireType) 2930 } 2931 var msglen int 2932 for shift := uint(0); ; shift += 7 { 2933 if shift >= 64 { 2934 return ErrIntOverflowLogtail 2935 } 2936 if iNdEx >= l { 2937 return io.ErrUnexpectedEOF 2938 } 2939 b := dAtA[iNdEx] 2940 iNdEx++ 2941 msglen |= int(b&0x7F) << shift 2942 if b < 0x80 { 2943 break 2944 } 2945 } 2946 if msglen < 0 { 2947 return ErrInvalidLengthLogtail 2948 } 2949 postIndex := iNdEx + msglen 2950 if postIndex < 0 { 2951 return ErrInvalidLengthLogtail 2952 } 2953 if postIndex > l { 2954 return io.ErrUnexpectedEOF 2955 } 2956 v := &UnSubscribeResponse{} 2957 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2958 return err 2959 } 2960 m.Response = &LogtailResponse_UnsubscribeResponse{v} 2961 iNdEx = postIndex 2962 case 4: 2963 if wireType != 2 { 2964 return fmt.Errorf("proto: wrong wireType = %d for field UpdateResponse", wireType) 2965 } 2966 var msglen int 2967 for shift := uint(0); ; shift += 7 { 2968 if shift >= 64 { 2969 return ErrIntOverflowLogtail 2970 } 2971 if iNdEx >= l { 2972 return io.ErrUnexpectedEOF 2973 } 2974 b := dAtA[iNdEx] 2975 iNdEx++ 2976 msglen |= int(b&0x7F) << shift 2977 if b < 0x80 { 2978 break 2979 } 2980 } 2981 if msglen < 0 { 2982 return ErrInvalidLengthLogtail 2983 } 2984 postIndex := iNdEx + msglen 2985 if postIndex < 0 { 2986 return ErrInvalidLengthLogtail 2987 } 2988 if postIndex > l { 2989 return io.ErrUnexpectedEOF 2990 } 2991 v := &UpdateResponse{} 2992 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2993 return err 2994 } 2995 m.Response = &LogtailResponse_UpdateResponse{v} 2996 iNdEx = postIndex 2997 case 5: 2998 if wireType != 2 { 2999 return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) 3000 } 3001 var msglen int 3002 for shift := uint(0); ; shift += 7 { 3003 if shift >= 64 { 3004 return ErrIntOverflowLogtail 3005 } 3006 if iNdEx >= l { 3007 return io.ErrUnexpectedEOF 3008 } 3009 b := dAtA[iNdEx] 3010 iNdEx++ 3011 msglen |= int(b&0x7F) << shift 3012 if b < 0x80 { 3013 break 3014 } 3015 } 3016 if msglen < 0 { 3017 return ErrInvalidLengthLogtail 3018 } 3019 postIndex := iNdEx + msglen 3020 if postIndex < 0 { 3021 return ErrInvalidLengthLogtail 3022 } 3023 if postIndex > l { 3024 return io.ErrUnexpectedEOF 3025 } 3026 v := &ErrorResponse{} 3027 if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3028 return err 3029 } 3030 m.Response = &LogtailResponse_Error{v} 3031 iNdEx = postIndex 3032 default: 3033 iNdEx = preIndex 3034 skippy, err := skipLogtail(dAtA[iNdEx:]) 3035 if err != nil { 3036 return err 3037 } 3038 if (skippy < 0) || (iNdEx+skippy) < 0 { 3039 return ErrInvalidLengthLogtail 3040 } 3041 if (iNdEx + skippy) > l { 3042 return io.ErrUnexpectedEOF 3043 } 3044 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3045 iNdEx += skippy 3046 } 3047 } 3048 3049 if iNdEx > l { 3050 return io.ErrUnexpectedEOF 3051 } 3052 return nil 3053 } 3054 func (m *MessageSegment) Unmarshal(dAtA []byte) error { 3055 l := len(dAtA) 3056 iNdEx := 0 3057 for iNdEx < l { 3058 preIndex := iNdEx 3059 var wire uint64 3060 for shift := uint(0); ; shift += 7 { 3061 if shift >= 64 { 3062 return ErrIntOverflowLogtail 3063 } 3064 if iNdEx >= l { 3065 return io.ErrUnexpectedEOF 3066 } 3067 b := dAtA[iNdEx] 3068 iNdEx++ 3069 wire |= uint64(b&0x7F) << shift 3070 if b < 0x80 { 3071 break 3072 } 3073 } 3074 fieldNum := int32(wire >> 3) 3075 wireType := int(wire & 0x7) 3076 if wireType == 4 { 3077 return fmt.Errorf("proto: MessageSegment: wiretype end group for non-group") 3078 } 3079 if fieldNum <= 0 { 3080 return fmt.Errorf("proto: MessageSegment: illegal tag %d (wire type %d)", fieldNum, wire) 3081 } 3082 switch fieldNum { 3083 case 1: 3084 if wireType != 0 { 3085 return fmt.Errorf("proto: wrong wireType = %d for field StreamID", wireType) 3086 } 3087 m.StreamID = 0 3088 for shift := uint(0); ; shift += 7 { 3089 if shift >= 64 { 3090 return ErrIntOverflowLogtail 3091 } 3092 if iNdEx >= l { 3093 return io.ErrUnexpectedEOF 3094 } 3095 b := dAtA[iNdEx] 3096 iNdEx++ 3097 m.StreamID |= uint64(b&0x7F) << shift 3098 if b < 0x80 { 3099 break 3100 } 3101 } 3102 case 2: 3103 if wireType != 0 { 3104 return fmt.Errorf("proto: wrong wireType = %d for field MessageSize", wireType) 3105 } 3106 m.MessageSize = 0 3107 for shift := uint(0); ; shift += 7 { 3108 if shift >= 64 { 3109 return ErrIntOverflowLogtail 3110 } 3111 if iNdEx >= l { 3112 return io.ErrUnexpectedEOF 3113 } 3114 b := dAtA[iNdEx] 3115 iNdEx++ 3116 m.MessageSize |= int32(b&0x7F) << shift 3117 if b < 0x80 { 3118 break 3119 } 3120 } 3121 case 3: 3122 if wireType != 0 { 3123 return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) 3124 } 3125 m.Sequence = 0 3126 for shift := uint(0); ; shift += 7 { 3127 if shift >= 64 { 3128 return ErrIntOverflowLogtail 3129 } 3130 if iNdEx >= l { 3131 return io.ErrUnexpectedEOF 3132 } 3133 b := dAtA[iNdEx] 3134 iNdEx++ 3135 m.Sequence |= int32(b&0x7F) << shift 3136 if b < 0x80 { 3137 break 3138 } 3139 } 3140 case 4: 3141 if wireType != 0 { 3142 return fmt.Errorf("proto: wrong wireType = %d for field MaxSequence", wireType) 3143 } 3144 m.MaxSequence = 0 3145 for shift := uint(0); ; shift += 7 { 3146 if shift >= 64 { 3147 return ErrIntOverflowLogtail 3148 } 3149 if iNdEx >= l { 3150 return io.ErrUnexpectedEOF 3151 } 3152 b := dAtA[iNdEx] 3153 iNdEx++ 3154 m.MaxSequence |= int32(b&0x7F) << shift 3155 if b < 0x80 { 3156 break 3157 } 3158 } 3159 case 5: 3160 if wireType != 2 { 3161 return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) 3162 } 3163 var byteLen int 3164 for shift := uint(0); ; shift += 7 { 3165 if shift >= 64 { 3166 return ErrIntOverflowLogtail 3167 } 3168 if iNdEx >= l { 3169 return io.ErrUnexpectedEOF 3170 } 3171 b := dAtA[iNdEx] 3172 iNdEx++ 3173 byteLen |= int(b&0x7F) << shift 3174 if b < 0x80 { 3175 break 3176 } 3177 } 3178 if byteLen < 0 { 3179 return ErrInvalidLengthLogtail 3180 } 3181 postIndex := iNdEx + byteLen 3182 if postIndex < 0 { 3183 return ErrInvalidLengthLogtail 3184 } 3185 if postIndex > l { 3186 return io.ErrUnexpectedEOF 3187 } 3188 m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) 3189 if m.Payload == nil { 3190 m.Payload = []byte{} 3191 } 3192 iNdEx = postIndex 3193 default: 3194 iNdEx = preIndex 3195 skippy, err := skipLogtail(dAtA[iNdEx:]) 3196 if err != nil { 3197 return err 3198 } 3199 if (skippy < 0) || (iNdEx+skippy) < 0 { 3200 return ErrInvalidLengthLogtail 3201 } 3202 if (iNdEx + skippy) > l { 3203 return io.ErrUnexpectedEOF 3204 } 3205 m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) 3206 iNdEx += skippy 3207 } 3208 } 3209 3210 if iNdEx > l { 3211 return io.ErrUnexpectedEOF 3212 } 3213 return nil 3214 } 3215 func skipLogtail(dAtA []byte) (n int, err error) { 3216 l := len(dAtA) 3217 iNdEx := 0 3218 depth := 0 3219 for iNdEx < l { 3220 var wire uint64 3221 for shift := uint(0); ; shift += 7 { 3222 if shift >= 64 { 3223 return 0, ErrIntOverflowLogtail 3224 } 3225 if iNdEx >= l { 3226 return 0, io.ErrUnexpectedEOF 3227 } 3228 b := dAtA[iNdEx] 3229 iNdEx++ 3230 wire |= (uint64(b) & 0x7F) << shift 3231 if b < 0x80 { 3232 break 3233 } 3234 } 3235 wireType := int(wire & 0x7) 3236 switch wireType { 3237 case 0: 3238 for shift := uint(0); ; shift += 7 { 3239 if shift >= 64 { 3240 return 0, ErrIntOverflowLogtail 3241 } 3242 if iNdEx >= l { 3243 return 0, io.ErrUnexpectedEOF 3244 } 3245 iNdEx++ 3246 if dAtA[iNdEx-1] < 0x80 { 3247 break 3248 } 3249 } 3250 case 1: 3251 iNdEx += 8 3252 case 2: 3253 var length int 3254 for shift := uint(0); ; shift += 7 { 3255 if shift >= 64 { 3256 return 0, ErrIntOverflowLogtail 3257 } 3258 if iNdEx >= l { 3259 return 0, io.ErrUnexpectedEOF 3260 } 3261 b := dAtA[iNdEx] 3262 iNdEx++ 3263 length |= (int(b) & 0x7F) << shift 3264 if b < 0x80 { 3265 break 3266 } 3267 } 3268 if length < 0 { 3269 return 0, ErrInvalidLengthLogtail 3270 } 3271 iNdEx += length 3272 case 3: 3273 depth++ 3274 case 4: 3275 if depth == 0 { 3276 return 0, ErrUnexpectedEndOfGroupLogtail 3277 } 3278 depth-- 3279 case 5: 3280 iNdEx += 4 3281 default: 3282 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 3283 } 3284 if iNdEx < 0 { 3285 return 0, ErrInvalidLengthLogtail 3286 } 3287 if depth == 0 { 3288 return iNdEx, nil 3289 } 3290 } 3291 return 0, io.ErrUnexpectedEOF 3292 } 3293 3294 var ( 3295 ErrInvalidLengthLogtail = fmt.Errorf("proto: negative length found during unmarshaling") 3296 ErrIntOverflowLogtail = fmt.Errorf("proto: integer overflow") 3297 ErrUnexpectedEndOfGroupLogtail = fmt.Errorf("proto: unexpected end of group") 3298 )