github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/cdc/processor/tablepb/table.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: processor/tablepb/table.proto 3 4 package tablepb 5 6 import ( 7 fmt "fmt" 8 _ "github.com/gogo/protobuf/gogoproto" 9 proto "github.com/gogo/protobuf/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // TableState is the state of table replication in processor. 27 // 28 // ┌────────┐ ┌───────────┐ ┌──────────┐ 29 // │ Absent ├─> │ Preparing ├─> │ Prepared │ 30 // └────────┘ └───────────┘ └─────┬────┘ 31 // v 32 // ┌─────────┐ ┌──────────┐ ┌─────────────┐ 33 // │ Stopped │ <─┤ Stopping │ <─┤ Replicating │ 34 // └─────────┘ └──────────┘ └─────────────┘ 35 // 36 // TODO rename to TableSpanState. 37 type TableState int32 38 39 const ( 40 TableStateUnknown TableState = 0 41 TableStateAbsent TableState = 1 42 TableStatePreparing TableState = 2 43 TableStatePrepared TableState = 3 44 TableStateReplicating TableState = 4 45 TableStateStopping TableState = 5 46 TableStateStopped TableState = 6 47 ) 48 49 var TableState_name = map[int32]string{ 50 0: "Unknown", 51 1: "Absent", 52 2: "Preparing", 53 3: "Prepared", 54 4: "Replicating", 55 5: "Stopping", 56 6: "Stopped", 57 } 58 59 var TableState_value = map[string]int32{ 60 "Unknown": 0, 61 "Absent": 1, 62 "Preparing": 2, 63 "Prepared": 3, 64 "Replicating": 4, 65 "Stopping": 5, 66 "Stopped": 6, 67 } 68 69 func (x TableState) String() string { 70 return proto.EnumName(TableState_name, int32(x)) 71 } 72 73 func (TableState) EnumDescriptor() ([]byte, []int) { 74 return fileDescriptor_ae83c9c6cf5ef75c, []int{0} 75 } 76 77 // Span is a full extent of key space from an inclusive start_key to 78 // an exclusive end_key. 79 type Span struct { 80 TableID TableID `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3,casttype=TableID" json:"table_id,omitempty"` 81 StartKey Key `protobuf:"bytes,2,opt,name=start_key,json=startKey,proto3,casttype=Key" json:"start_key,omitempty"` 82 EndKey Key `protobuf:"bytes,3,opt,name=end_key,json=endKey,proto3,casttype=Key" json:"end_key,omitempty"` 83 } 84 85 func (m *Span) Reset() { *m = Span{} } 86 func (*Span) ProtoMessage() {} 87 func (*Span) Descriptor() ([]byte, []int) { 88 return fileDescriptor_ae83c9c6cf5ef75c, []int{0} 89 } 90 func (m *Span) XXX_Unmarshal(b []byte) error { 91 return m.Unmarshal(b) 92 } 93 func (m *Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 94 if deterministic { 95 return xxx_messageInfo_Span.Marshal(b, m, deterministic) 96 } else { 97 b = b[:cap(b)] 98 n, err := m.MarshalToSizedBuffer(b) 99 if err != nil { 100 return nil, err 101 } 102 return b[:n], nil 103 } 104 } 105 func (m *Span) XXX_Merge(src proto.Message) { 106 xxx_messageInfo_Span.Merge(m, src) 107 } 108 func (m *Span) XXX_Size() int { 109 return m.Size() 110 } 111 func (m *Span) XXX_DiscardUnknown() { 112 xxx_messageInfo_Span.DiscardUnknown(m) 113 } 114 115 var xxx_messageInfo_Span proto.InternalMessageInfo 116 117 type Checkpoint struct { 118 CheckpointTs Ts `protobuf:"varint,1,opt,name=checkpoint_ts,json=checkpointTs,proto3,casttype=Ts" json:"checkpoint_ts,omitempty"` 119 ResolvedTs Ts `protobuf:"varint,2,opt,name=resolved_ts,json=resolvedTs,proto3,casttype=Ts" json:"resolved_ts,omitempty"` 120 LastSyncedTs Ts `protobuf:"varint,3,opt,name=last_synced_ts,json=lastSyncedTs,proto3,casttype=Ts" json:"last_synced_ts,omitempty"` 121 } 122 123 func (m *Checkpoint) Reset() { *m = Checkpoint{} } 124 func (m *Checkpoint) String() string { return proto.CompactTextString(m) } 125 func (*Checkpoint) ProtoMessage() {} 126 func (*Checkpoint) Descriptor() ([]byte, []int) { 127 return fileDescriptor_ae83c9c6cf5ef75c, []int{1} 128 } 129 func (m *Checkpoint) XXX_Unmarshal(b []byte) error { 130 return m.Unmarshal(b) 131 } 132 func (m *Checkpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 133 if deterministic { 134 return xxx_messageInfo_Checkpoint.Marshal(b, m, deterministic) 135 } else { 136 b = b[:cap(b)] 137 n, err := m.MarshalToSizedBuffer(b) 138 if err != nil { 139 return nil, err 140 } 141 return b[:n], nil 142 } 143 } 144 func (m *Checkpoint) XXX_Merge(src proto.Message) { 145 xxx_messageInfo_Checkpoint.Merge(m, src) 146 } 147 func (m *Checkpoint) XXX_Size() int { 148 return m.Size() 149 } 150 func (m *Checkpoint) XXX_DiscardUnknown() { 151 xxx_messageInfo_Checkpoint.DiscardUnknown(m) 152 } 153 154 var xxx_messageInfo_Checkpoint proto.InternalMessageInfo 155 156 func (m *Checkpoint) GetCheckpointTs() Ts { 157 if m != nil { 158 return m.CheckpointTs 159 } 160 return 0 161 } 162 163 func (m *Checkpoint) GetResolvedTs() Ts { 164 if m != nil { 165 return m.ResolvedTs 166 } 167 return 0 168 } 169 170 func (m *Checkpoint) GetLastSyncedTs() Ts { 171 if m != nil { 172 return m.LastSyncedTs 173 } 174 return 0 175 } 176 177 // Stats holds a statistic for a table. 178 type Stats struct { 179 // Number of captured regions. 180 RegionCount uint64 `protobuf:"varint,1,opt,name=region_count,json=regionCount,proto3" json:"region_count,omitempty"` 181 // The current timestamp from the table's point of view. 182 CurrentTs Ts `protobuf:"varint,2,opt,name=current_ts,json=currentTs,proto3,casttype=Ts" json:"current_ts,omitempty"` 183 // Checkponits at each stage. 184 StageCheckpoints map[string]Checkpoint `protobuf:"bytes,3,rep,name=stage_checkpoints,json=stageCheckpoints,proto3" json:"stage_checkpoints" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` 185 // The barrier timestamp of the table. 186 BarrierTs Ts `protobuf:"varint,4,opt,name=barrier_ts,json=barrierTs,proto3,casttype=Ts" json:"barrier_ts,omitempty"` 187 } 188 189 func (m *Stats) Reset() { *m = Stats{} } 190 func (m *Stats) String() string { return proto.CompactTextString(m) } 191 func (*Stats) ProtoMessage() {} 192 func (*Stats) Descriptor() ([]byte, []int) { 193 return fileDescriptor_ae83c9c6cf5ef75c, []int{2} 194 } 195 func (m *Stats) XXX_Unmarshal(b []byte) error { 196 return m.Unmarshal(b) 197 } 198 func (m *Stats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 199 if deterministic { 200 return xxx_messageInfo_Stats.Marshal(b, m, deterministic) 201 } else { 202 b = b[:cap(b)] 203 n, err := m.MarshalToSizedBuffer(b) 204 if err != nil { 205 return nil, err 206 } 207 return b[:n], nil 208 } 209 } 210 func (m *Stats) XXX_Merge(src proto.Message) { 211 xxx_messageInfo_Stats.Merge(m, src) 212 } 213 func (m *Stats) XXX_Size() int { 214 return m.Size() 215 } 216 func (m *Stats) XXX_DiscardUnknown() { 217 xxx_messageInfo_Stats.DiscardUnknown(m) 218 } 219 220 var xxx_messageInfo_Stats proto.InternalMessageInfo 221 222 func (m *Stats) GetRegionCount() uint64 { 223 if m != nil { 224 return m.RegionCount 225 } 226 return 0 227 } 228 229 func (m *Stats) GetCurrentTs() Ts { 230 if m != nil { 231 return m.CurrentTs 232 } 233 return 0 234 } 235 236 func (m *Stats) GetStageCheckpoints() map[string]Checkpoint { 237 if m != nil { 238 return m.StageCheckpoints 239 } 240 return nil 241 } 242 243 func (m *Stats) GetBarrierTs() Ts { 244 if m != nil { 245 return m.BarrierTs 246 } 247 return 0 248 } 249 250 // TableStatus is the running status of a table. 251 // TODO rename to TableStatus. 252 type TableStatus struct { 253 TableID TableID `protobuf:"varint,1,opt,name=table_id,json=tableId,proto3,casttype=TableID" json:"table_id,omitempty"` 254 Span Span `protobuf:"bytes,5,opt,name=span,proto3" json:"span"` 255 State TableState `protobuf:"varint,2,opt,name=state,proto3,enum=pingcap.tiflow.cdc.processor.tablepb.TableState" json:"state,omitempty"` 256 Checkpoint Checkpoint `protobuf:"bytes,3,opt,name=checkpoint,proto3" json:"checkpoint"` 257 Stats Stats `protobuf:"bytes,4,opt,name=stats,proto3" json:"stats"` 258 } 259 260 func (m *TableStatus) Reset() { *m = TableStatus{} } 261 func (m *TableStatus) String() string { return proto.CompactTextString(m) } 262 func (*TableStatus) ProtoMessage() {} 263 func (*TableStatus) Descriptor() ([]byte, []int) { 264 return fileDescriptor_ae83c9c6cf5ef75c, []int{3} 265 } 266 func (m *TableStatus) XXX_Unmarshal(b []byte) error { 267 return m.Unmarshal(b) 268 } 269 func (m *TableStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 270 if deterministic { 271 return xxx_messageInfo_TableStatus.Marshal(b, m, deterministic) 272 } else { 273 b = b[:cap(b)] 274 n, err := m.MarshalToSizedBuffer(b) 275 if err != nil { 276 return nil, err 277 } 278 return b[:n], nil 279 } 280 } 281 func (m *TableStatus) XXX_Merge(src proto.Message) { 282 xxx_messageInfo_TableStatus.Merge(m, src) 283 } 284 func (m *TableStatus) XXX_Size() int { 285 return m.Size() 286 } 287 func (m *TableStatus) XXX_DiscardUnknown() { 288 xxx_messageInfo_TableStatus.DiscardUnknown(m) 289 } 290 291 var xxx_messageInfo_TableStatus proto.InternalMessageInfo 292 293 func (m *TableStatus) GetTableID() TableID { 294 if m != nil { 295 return m.TableID 296 } 297 return 0 298 } 299 300 func (m *TableStatus) GetSpan() Span { 301 if m != nil { 302 return m.Span 303 } 304 return Span{} 305 } 306 307 func (m *TableStatus) GetState() TableState { 308 if m != nil { 309 return m.State 310 } 311 return TableStateUnknown 312 } 313 314 func (m *TableStatus) GetCheckpoint() Checkpoint { 315 if m != nil { 316 return m.Checkpoint 317 } 318 return Checkpoint{} 319 } 320 321 func (m *TableStatus) GetStats() Stats { 322 if m != nil { 323 return m.Stats 324 } 325 return Stats{} 326 } 327 328 func init() { 329 proto.RegisterEnum("pingcap.tiflow.cdc.processor.tablepb.TableState", TableState_name, TableState_value) 330 proto.RegisterType((*Span)(nil), "pingcap.tiflow.cdc.processor.tablepb.Span") 331 proto.RegisterType((*Checkpoint)(nil), "pingcap.tiflow.cdc.processor.tablepb.Checkpoint") 332 proto.RegisterType((*Stats)(nil), "pingcap.tiflow.cdc.processor.tablepb.Stats") 333 proto.RegisterMapType((map[string]Checkpoint)(nil), "pingcap.tiflow.cdc.processor.tablepb.Stats.StageCheckpointsEntry") 334 proto.RegisterType((*TableStatus)(nil), "pingcap.tiflow.cdc.processor.tablepb.TableStatus") 335 } 336 337 func init() { proto.RegisterFile("processor/tablepb/table.proto", fileDescriptor_ae83c9c6cf5ef75c) } 338 339 var fileDescriptor_ae83c9c6cf5ef75c = []byte{ 340 // 706 bytes of a gzipped FileDescriptorProto 341 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, 342 0x1c, 0xb5, 0x9d, 0x5f, 0xcd, 0x27, 0xf9, 0x56, 0xee, 0x7d, 0xdb, 0x52, 0x22, 0x91, 0x98, 0xa8, 343 0x40, 0xd5, 0x22, 0x07, 0xca, 0x82, 0xba, 0x35, 0x2d, 0xa0, 0xaa, 0x42, 0x42, 0x4e, 0x60, 0x60, 344 0x89, 0x1c, 0xfb, 0x70, 0xad, 0x86, 0xb3, 0xe5, 0xbb, 0xb4, 0xca, 0xc6, 0x88, 0xb2, 0xd0, 0x09, 345 0xb1, 0x44, 0xea, 0x9f, 0xd3, 0xb1, 0x23, 0x03, 0x8a, 0x20, 0x15, 0x33, 0x7b, 0x27, 0x74, 0x77, 346 0x6e, 0xdc, 0x04, 0x86, 0xd0, 0x25, 0x39, 0xdf, 0x7b, 0x9f, 0xa7, 0xf7, 0xde, 0x9d, 0x0e, 0xee, 347 0x84, 0x51, 0xe0, 0x60, 0x4a, 0x83, 0xa8, 0xc6, 0xec, 0x76, 0x07, 0x87, 0x6d, 0xf9, 0x6f, 0x86, 348 0x51, 0xc0, 0x02, 0xb4, 0x1a, 0xfa, 0xc4, 0x73, 0xec, 0xd0, 0x64, 0xfe, 0xbb, 0x4e, 0x70, 0x6c, 349 0x3a, 0xae, 0x63, 0x8e, 0x27, 0xcc, 0x78, 0xa2, 0xb4, 0xe8, 0x05, 0x5e, 0x20, 0x06, 0x6a, 0x7c, 350 0x25, 0x67, 0xab, 0x9f, 0x54, 0x48, 0x37, 0x42, 0x9b, 0xa0, 0xc7, 0x30, 0x27, 0x98, 0x2d, 0xdf, 351 0x5d, 0x51, 0x0d, 0x75, 0x2d, 0x55, 0x5f, 0x1e, 0x0d, 0x2b, 0xb9, 0x26, 0xdf, 0xdb, 0xdb, 0xbd, 352 0x4c, 0x96, 0x56, 0x4e, 0xf0, 0xf6, 0x5c, 0xb4, 0x0a, 0x79, 0xca, 0xec, 0x88, 0xb5, 0x0e, 0x71, 353 0x6f, 0x45, 0x33, 0xd4, 0xb5, 0x62, 0x3d, 0x77, 0x39, 0xac, 0xa4, 0xf6, 0x71, 0xcf, 0x9a, 0x13, 354 0xc8, 0x3e, 0xee, 0x21, 0x03, 0x72, 0x98, 0xb8, 0x82, 0x93, 0x9a, 0xe4, 0x64, 0x31, 0x71, 0xf7, 355 0x71, 0x6f, 0xab, 0xf8, 0xf1, 0xb4, 0xa2, 0x7c, 0x39, 0xad, 0x28, 0x1f, 0xbe, 0x19, 0x4a, 0xf5, 356 0x44, 0x05, 0xd8, 0x39, 0xc0, 0xce, 0x61, 0x18, 0xf8, 0x84, 0xa1, 0x0d, 0xf8, 0xcf, 0x19, 0x7f, 357 0xb5, 0x18, 0x15, 0xe6, 0xd2, 0xf5, 0xec, 0xe5, 0xb0, 0xa2, 0x35, 0xa9, 0x55, 0x4c, 0xc0, 0x26, 358 0x45, 0x0f, 0xa0, 0x10, 0x61, 0x1a, 0x74, 0x8e, 0xb0, 0xcb, 0xa9, 0xda, 0x04, 0x15, 0xae, 0xa0, 359 0x26, 0x45, 0x0f, 0x61, 0xbe, 0x63, 0x53, 0xd6, 0xa2, 0x3d, 0xe2, 0x48, 0x6e, 0x6a, 0x52, 0x96, 360 0xa3, 0x0d, 0x01, 0x36, 0x69, 0xf5, 0xa7, 0x06, 0x99, 0x06, 0xb3, 0x19, 0x45, 0x77, 0xa1, 0x18, 361 0x61, 0xcf, 0x0f, 0x48, 0xcb, 0x09, 0xba, 0x84, 0x49, 0x33, 0x56, 0x41, 0xee, 0xed, 0xf0, 0x2d, 362 0x74, 0x0f, 0xc0, 0xe9, 0x46, 0x11, 0x96, 0x6e, 0x27, 0x2d, 0xe4, 0x63, 0xa4, 0x49, 0x11, 0x83, 363 0x05, 0xca, 0x6c, 0x0f, 0xb7, 0x92, 0x00, 0xdc, 0x44, 0x6a, 0xad, 0xb0, 0xb9, 0x6d, 0xce, 0x72, 364 0xa0, 0xa6, 0x70, 0xc4, 0x7f, 0x3d, 0x9c, 0xf4, 0x45, 0x9f, 0x11, 0x16, 0xf5, 0xea, 0xe9, 0xb3, 365 0x61, 0x45, 0xb1, 0x74, 0x3a, 0x05, 0x72, 0x73, 0x6d, 0x3b, 0x8a, 0x7c, 0x1c, 0x71, 0x73, 0xe9, 366 0x49, 0x73, 0x31, 0xd2, 0xa4, 0xa5, 0x2e, 0x2c, 0xfd, 0x55, 0x17, 0xe9, 0x90, 0xe2, 0x07, 0xc9, 367 0x63, 0xe7, 0x2d, 0xbe, 0x44, 0xcf, 0x21, 0x73, 0x64, 0x77, 0xba, 0x58, 0x24, 0x2d, 0x6c, 0x3e, 368 0x9a, 0xcd, 0x7b, 0x22, 0x6c, 0xc9, 0xf1, 0x2d, 0xed, 0xa9, 0x5a, 0xfd, 0xa5, 0x41, 0x41, 0xdc, 369 0x32, 0x1e, 0xad, 0x4b, 0x6f, 0x72, 0x27, 0x77, 0x21, 0x4d, 0x43, 0x9b, 0xac, 0x64, 0x84, 0x9b, 370 0xf5, 0x19, 0x9b, 0x0c, 0x6d, 0x12, 0x57, 0x26, 0xa6, 0x79, 0x28, 0xca, 0x6c, 0x26, 0x43, 0xcd, 371 0xcf, 0x1a, 0x6a, 0x6c, 0x1d, 0x5b, 0x72, 0x1c, 0xbd, 0x01, 0x48, 0x8e, 0x57, 0x5c, 0xb1, 0x1b, 372 0x34, 0x14, 0x3b, 0xbb, 0xa6, 0x84, 0x5e, 0x48, 0x7f, 0xf2, 0x04, 0x0b, 0x9b, 0x1b, 0xff, 0x70, 373 0x61, 0x62, 0x35, 0x39, 0xbf, 0xfe, 0x59, 0x03, 0x48, 0x6c, 0xa3, 0x2a, 0xe4, 0x5e, 0x93, 0x43, 374 0x12, 0x1c, 0x13, 0x5d, 0x29, 0x2d, 0xf5, 0x07, 0xc6, 0x42, 0x02, 0xc6, 0x00, 0x32, 0x20, 0xbb, 375 0xdd, 0xa6, 0x98, 0x30, 0x5d, 0x2d, 0x2d, 0xf6, 0x07, 0x86, 0x9e, 0x50, 0xe4, 0x3e, 0xba, 0x0f, 376 0xf9, 0x57, 0x11, 0x0e, 0xed, 0xc8, 0x27, 0x9e, 0xae, 0x95, 0x6e, 0xf5, 0x07, 0xc6, 0xff, 0x09, 377 0x69, 0x0c, 0xa1, 0x55, 0x98, 0x93, 0x1f, 0xd8, 0xd5, 0x53, 0xa5, 0xe5, 0xfe, 0xc0, 0x40, 0xd3, 378 0x34, 0xec, 0xa2, 0x75, 0x28, 0x58, 0x38, 0xec, 0xf8, 0x8e, 0xcd, 0xb8, 0x5e, 0xba, 0x74, 0xbb, 379 0x3f, 0x30, 0x96, 0xae, 0x75, 0x9d, 0x80, 0x5c, 0xb1, 0xc1, 0x82, 0x90, 0xb7, 0xa1, 0x67, 0xa6, 380 0x15, 0xaf, 0x10, 0x9e, 0x52, 0xac, 0xb1, 0xab, 0x67, 0xa7, 0x53, 0xc6, 0x40, 0xfd, 0xe5, 0xf9, 381 0x8f, 0xb2, 0x72, 0x36, 0x2a, 0xab, 0xe7, 0xa3, 0xb2, 0xfa, 0x7d, 0x54, 0x56, 0x4f, 0x2e, 0xca, 382 0xca, 0xf9, 0x45, 0x59, 0xf9, 0x7a, 0x51, 0x56, 0xde, 0xd6, 0x3c, 0x9f, 0x1d, 0x74, 0xdb, 0xa6, 383 0x13, 0xbc, 0xaf, 0xc5, 0xd5, 0xd7, 0x64, 0xf5, 0x35, 0xc7, 0x75, 0x6a, 0x7f, 0x3c, 0xd7, 0xed, 384 0xac, 0x78, 0x6d, 0x9f, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xeb, 0x06, 0x9b, 0xca, 0x05, 385 0x00, 0x00, 386 } 387 388 func (m *Span) Marshal() (dAtA []byte, err error) { 389 size := m.Size() 390 dAtA = make([]byte, size) 391 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 392 if err != nil { 393 return nil, err 394 } 395 return dAtA[:n], nil 396 } 397 398 func (m *Span) MarshalTo(dAtA []byte) (int, error) { 399 size := m.Size() 400 return m.MarshalToSizedBuffer(dAtA[:size]) 401 } 402 403 func (m *Span) MarshalToSizedBuffer(dAtA []byte) (int, error) { 404 i := len(dAtA) 405 _ = i 406 var l int 407 _ = l 408 if len(m.EndKey) > 0 { 409 i -= len(m.EndKey) 410 copy(dAtA[i:], m.EndKey) 411 i = encodeVarintTable(dAtA, i, uint64(len(m.EndKey))) 412 i-- 413 dAtA[i] = 0x1a 414 } 415 if len(m.StartKey) > 0 { 416 i -= len(m.StartKey) 417 copy(dAtA[i:], m.StartKey) 418 i = encodeVarintTable(dAtA, i, uint64(len(m.StartKey))) 419 i-- 420 dAtA[i] = 0x12 421 } 422 if m.TableID != 0 { 423 i = encodeVarintTable(dAtA, i, uint64(m.TableID)) 424 i-- 425 dAtA[i] = 0x8 426 } 427 return len(dAtA) - i, nil 428 } 429 430 func (m *Checkpoint) Marshal() (dAtA []byte, err error) { 431 size := m.Size() 432 dAtA = make([]byte, size) 433 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 434 if err != nil { 435 return nil, err 436 } 437 return dAtA[:n], nil 438 } 439 440 func (m *Checkpoint) MarshalTo(dAtA []byte) (int, error) { 441 size := m.Size() 442 return m.MarshalToSizedBuffer(dAtA[:size]) 443 } 444 445 func (m *Checkpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { 446 i := len(dAtA) 447 _ = i 448 var l int 449 _ = l 450 if m.LastSyncedTs != 0 { 451 i = encodeVarintTable(dAtA, i, uint64(m.LastSyncedTs)) 452 i-- 453 dAtA[i] = 0x18 454 } 455 if m.ResolvedTs != 0 { 456 i = encodeVarintTable(dAtA, i, uint64(m.ResolvedTs)) 457 i-- 458 dAtA[i] = 0x10 459 } 460 if m.CheckpointTs != 0 { 461 i = encodeVarintTable(dAtA, i, uint64(m.CheckpointTs)) 462 i-- 463 dAtA[i] = 0x8 464 } 465 return len(dAtA) - i, nil 466 } 467 468 func (m *Stats) Marshal() (dAtA []byte, err error) { 469 size := m.Size() 470 dAtA = make([]byte, size) 471 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 472 if err != nil { 473 return nil, err 474 } 475 return dAtA[:n], nil 476 } 477 478 func (m *Stats) MarshalTo(dAtA []byte) (int, error) { 479 size := m.Size() 480 return m.MarshalToSizedBuffer(dAtA[:size]) 481 } 482 483 func (m *Stats) MarshalToSizedBuffer(dAtA []byte) (int, error) { 484 i := len(dAtA) 485 _ = i 486 var l int 487 _ = l 488 if m.BarrierTs != 0 { 489 i = encodeVarintTable(dAtA, i, uint64(m.BarrierTs)) 490 i-- 491 dAtA[i] = 0x20 492 } 493 if len(m.StageCheckpoints) > 0 { 494 for k := range m.StageCheckpoints { 495 v := m.StageCheckpoints[k] 496 baseI := i 497 { 498 size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) 499 if err != nil { 500 return 0, err 501 } 502 i -= size 503 i = encodeVarintTable(dAtA, i, uint64(size)) 504 } 505 i-- 506 dAtA[i] = 0x12 507 i -= len(k) 508 copy(dAtA[i:], k) 509 i = encodeVarintTable(dAtA, i, uint64(len(k))) 510 i-- 511 dAtA[i] = 0xa 512 i = encodeVarintTable(dAtA, i, uint64(baseI-i)) 513 i-- 514 dAtA[i] = 0x1a 515 } 516 } 517 if m.CurrentTs != 0 { 518 i = encodeVarintTable(dAtA, i, uint64(m.CurrentTs)) 519 i-- 520 dAtA[i] = 0x10 521 } 522 if m.RegionCount != 0 { 523 i = encodeVarintTable(dAtA, i, uint64(m.RegionCount)) 524 i-- 525 dAtA[i] = 0x8 526 } 527 return len(dAtA) - i, nil 528 } 529 530 func (m *TableStatus) Marshal() (dAtA []byte, err error) { 531 size := m.Size() 532 dAtA = make([]byte, size) 533 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 534 if err != nil { 535 return nil, err 536 } 537 return dAtA[:n], nil 538 } 539 540 func (m *TableStatus) MarshalTo(dAtA []byte) (int, error) { 541 size := m.Size() 542 return m.MarshalToSizedBuffer(dAtA[:size]) 543 } 544 545 func (m *TableStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { 546 i := len(dAtA) 547 _ = i 548 var l int 549 _ = l 550 { 551 size, err := m.Span.MarshalToSizedBuffer(dAtA[:i]) 552 if err != nil { 553 return 0, err 554 } 555 i -= size 556 i = encodeVarintTable(dAtA, i, uint64(size)) 557 } 558 i-- 559 dAtA[i] = 0x2a 560 { 561 size, err := m.Stats.MarshalToSizedBuffer(dAtA[:i]) 562 if err != nil { 563 return 0, err 564 } 565 i -= size 566 i = encodeVarintTable(dAtA, i, uint64(size)) 567 } 568 i-- 569 dAtA[i] = 0x22 570 { 571 size, err := m.Checkpoint.MarshalToSizedBuffer(dAtA[:i]) 572 if err != nil { 573 return 0, err 574 } 575 i -= size 576 i = encodeVarintTable(dAtA, i, uint64(size)) 577 } 578 i-- 579 dAtA[i] = 0x1a 580 if m.State != 0 { 581 i = encodeVarintTable(dAtA, i, uint64(m.State)) 582 i-- 583 dAtA[i] = 0x10 584 } 585 if m.TableID != 0 { 586 i = encodeVarintTable(dAtA, i, uint64(m.TableID)) 587 i-- 588 dAtA[i] = 0x8 589 } 590 return len(dAtA) - i, nil 591 } 592 593 func encodeVarintTable(dAtA []byte, offset int, v uint64) int { 594 offset -= sovTable(v) 595 base := offset 596 for v >= 1<<7 { 597 dAtA[offset] = uint8(v&0x7f | 0x80) 598 v >>= 7 599 offset++ 600 } 601 dAtA[offset] = uint8(v) 602 return base 603 } 604 func (m *Span) Size() (n int) { 605 if m == nil { 606 return 0 607 } 608 var l int 609 _ = l 610 if m.TableID != 0 { 611 n += 1 + sovTable(uint64(m.TableID)) 612 } 613 l = len(m.StartKey) 614 if l > 0 { 615 n += 1 + l + sovTable(uint64(l)) 616 } 617 l = len(m.EndKey) 618 if l > 0 { 619 n += 1 + l + sovTable(uint64(l)) 620 } 621 return n 622 } 623 624 func (m *Checkpoint) Size() (n int) { 625 if m == nil { 626 return 0 627 } 628 var l int 629 _ = l 630 if m.CheckpointTs != 0 { 631 n += 1 + sovTable(uint64(m.CheckpointTs)) 632 } 633 if m.ResolvedTs != 0 { 634 n += 1 + sovTable(uint64(m.ResolvedTs)) 635 } 636 if m.LastSyncedTs != 0 { 637 n += 1 + sovTable(uint64(m.LastSyncedTs)) 638 } 639 return n 640 } 641 642 func (m *Stats) Size() (n int) { 643 if m == nil { 644 return 0 645 } 646 var l int 647 _ = l 648 if m.RegionCount != 0 { 649 n += 1 + sovTable(uint64(m.RegionCount)) 650 } 651 if m.CurrentTs != 0 { 652 n += 1 + sovTable(uint64(m.CurrentTs)) 653 } 654 if len(m.StageCheckpoints) > 0 { 655 for k, v := range m.StageCheckpoints { 656 _ = k 657 _ = v 658 l = v.Size() 659 mapEntrySize := 1 + len(k) + sovTable(uint64(len(k))) + 1 + l + sovTable(uint64(l)) 660 n += mapEntrySize + 1 + sovTable(uint64(mapEntrySize)) 661 } 662 } 663 if m.BarrierTs != 0 { 664 n += 1 + sovTable(uint64(m.BarrierTs)) 665 } 666 return n 667 } 668 669 func (m *TableStatus) Size() (n int) { 670 if m == nil { 671 return 0 672 } 673 var l int 674 _ = l 675 if m.TableID != 0 { 676 n += 1 + sovTable(uint64(m.TableID)) 677 } 678 if m.State != 0 { 679 n += 1 + sovTable(uint64(m.State)) 680 } 681 l = m.Checkpoint.Size() 682 n += 1 + l + sovTable(uint64(l)) 683 l = m.Stats.Size() 684 n += 1 + l + sovTable(uint64(l)) 685 l = m.Span.Size() 686 n += 1 + l + sovTable(uint64(l)) 687 return n 688 } 689 690 func sovTable(x uint64) (n int) { 691 return (math_bits.Len64(x|1) + 6) / 7 692 } 693 func sozTable(x uint64) (n int) { 694 return sovTable(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 695 } 696 func (m *Span) Unmarshal(dAtA []byte) error { 697 l := len(dAtA) 698 iNdEx := 0 699 for iNdEx < l { 700 preIndex := iNdEx 701 var wire uint64 702 for shift := uint(0); ; shift += 7 { 703 if shift >= 64 { 704 return ErrIntOverflowTable 705 } 706 if iNdEx >= l { 707 return io.ErrUnexpectedEOF 708 } 709 b := dAtA[iNdEx] 710 iNdEx++ 711 wire |= uint64(b&0x7F) << shift 712 if b < 0x80 { 713 break 714 } 715 } 716 fieldNum := int32(wire >> 3) 717 wireType := int(wire & 0x7) 718 if wireType == 4 { 719 return fmt.Errorf("proto: Span: wiretype end group for non-group") 720 } 721 if fieldNum <= 0 { 722 return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire) 723 } 724 switch fieldNum { 725 case 1: 726 if wireType != 0 { 727 return fmt.Errorf("proto: wrong wireType = %d for field TableID", wireType) 728 } 729 m.TableID = 0 730 for shift := uint(0); ; shift += 7 { 731 if shift >= 64 { 732 return ErrIntOverflowTable 733 } 734 if iNdEx >= l { 735 return io.ErrUnexpectedEOF 736 } 737 b := dAtA[iNdEx] 738 iNdEx++ 739 m.TableID |= TableID(b&0x7F) << shift 740 if b < 0x80 { 741 break 742 } 743 } 744 case 2: 745 if wireType != 2 { 746 return fmt.Errorf("proto: wrong wireType = %d for field StartKey", wireType) 747 } 748 var byteLen int 749 for shift := uint(0); ; shift += 7 { 750 if shift >= 64 { 751 return ErrIntOverflowTable 752 } 753 if iNdEx >= l { 754 return io.ErrUnexpectedEOF 755 } 756 b := dAtA[iNdEx] 757 iNdEx++ 758 byteLen |= int(b&0x7F) << shift 759 if b < 0x80 { 760 break 761 } 762 } 763 if byteLen < 0 { 764 return ErrInvalidLengthTable 765 } 766 postIndex := iNdEx + byteLen 767 if postIndex < 0 { 768 return ErrInvalidLengthTable 769 } 770 if postIndex > l { 771 return io.ErrUnexpectedEOF 772 } 773 m.StartKey = append(m.StartKey[:0], dAtA[iNdEx:postIndex]...) 774 if m.StartKey == nil { 775 m.StartKey = []byte{} 776 } 777 iNdEx = postIndex 778 case 3: 779 if wireType != 2 { 780 return fmt.Errorf("proto: wrong wireType = %d for field EndKey", wireType) 781 } 782 var byteLen int 783 for shift := uint(0); ; shift += 7 { 784 if shift >= 64 { 785 return ErrIntOverflowTable 786 } 787 if iNdEx >= l { 788 return io.ErrUnexpectedEOF 789 } 790 b := dAtA[iNdEx] 791 iNdEx++ 792 byteLen |= int(b&0x7F) << shift 793 if b < 0x80 { 794 break 795 } 796 } 797 if byteLen < 0 { 798 return ErrInvalidLengthTable 799 } 800 postIndex := iNdEx + byteLen 801 if postIndex < 0 { 802 return ErrInvalidLengthTable 803 } 804 if postIndex > l { 805 return io.ErrUnexpectedEOF 806 } 807 m.EndKey = append(m.EndKey[:0], dAtA[iNdEx:postIndex]...) 808 if m.EndKey == nil { 809 m.EndKey = []byte{} 810 } 811 iNdEx = postIndex 812 default: 813 iNdEx = preIndex 814 skippy, err := skipTable(dAtA[iNdEx:]) 815 if err != nil { 816 return err 817 } 818 if (skippy < 0) || (iNdEx+skippy) < 0 { 819 return ErrInvalidLengthTable 820 } 821 if (iNdEx + skippy) > l { 822 return io.ErrUnexpectedEOF 823 } 824 iNdEx += skippy 825 } 826 } 827 828 if iNdEx > l { 829 return io.ErrUnexpectedEOF 830 } 831 return nil 832 } 833 func (m *Checkpoint) Unmarshal(dAtA []byte) error { 834 l := len(dAtA) 835 iNdEx := 0 836 for iNdEx < l { 837 preIndex := iNdEx 838 var wire uint64 839 for shift := uint(0); ; shift += 7 { 840 if shift >= 64 { 841 return ErrIntOverflowTable 842 } 843 if iNdEx >= l { 844 return io.ErrUnexpectedEOF 845 } 846 b := dAtA[iNdEx] 847 iNdEx++ 848 wire |= uint64(b&0x7F) << shift 849 if b < 0x80 { 850 break 851 } 852 } 853 fieldNum := int32(wire >> 3) 854 wireType := int(wire & 0x7) 855 if wireType == 4 { 856 return fmt.Errorf("proto: Checkpoint: wiretype end group for non-group") 857 } 858 if fieldNum <= 0 { 859 return fmt.Errorf("proto: Checkpoint: illegal tag %d (wire type %d)", fieldNum, wire) 860 } 861 switch fieldNum { 862 case 1: 863 if wireType != 0 { 864 return fmt.Errorf("proto: wrong wireType = %d for field CheckpointTs", wireType) 865 } 866 m.CheckpointTs = 0 867 for shift := uint(0); ; shift += 7 { 868 if shift >= 64 { 869 return ErrIntOverflowTable 870 } 871 if iNdEx >= l { 872 return io.ErrUnexpectedEOF 873 } 874 b := dAtA[iNdEx] 875 iNdEx++ 876 m.CheckpointTs |= Ts(b&0x7F) << shift 877 if b < 0x80 { 878 break 879 } 880 } 881 case 2: 882 if wireType != 0 { 883 return fmt.Errorf("proto: wrong wireType = %d for field ResolvedTs", wireType) 884 } 885 m.ResolvedTs = 0 886 for shift := uint(0); ; shift += 7 { 887 if shift >= 64 { 888 return ErrIntOverflowTable 889 } 890 if iNdEx >= l { 891 return io.ErrUnexpectedEOF 892 } 893 b := dAtA[iNdEx] 894 iNdEx++ 895 m.ResolvedTs |= Ts(b&0x7F) << shift 896 if b < 0x80 { 897 break 898 } 899 } 900 case 3: 901 if wireType != 0 { 902 return fmt.Errorf("proto: wrong wireType = %d for field LastSyncedTs", wireType) 903 } 904 m.LastSyncedTs = 0 905 for shift := uint(0); ; shift += 7 { 906 if shift >= 64 { 907 return ErrIntOverflowTable 908 } 909 if iNdEx >= l { 910 return io.ErrUnexpectedEOF 911 } 912 b := dAtA[iNdEx] 913 iNdEx++ 914 m.LastSyncedTs |= Ts(b&0x7F) << shift 915 if b < 0x80 { 916 break 917 } 918 } 919 default: 920 iNdEx = preIndex 921 skippy, err := skipTable(dAtA[iNdEx:]) 922 if err != nil { 923 return err 924 } 925 if (skippy < 0) || (iNdEx+skippy) < 0 { 926 return ErrInvalidLengthTable 927 } 928 if (iNdEx + skippy) > l { 929 return io.ErrUnexpectedEOF 930 } 931 iNdEx += skippy 932 } 933 } 934 935 if iNdEx > l { 936 return io.ErrUnexpectedEOF 937 } 938 return nil 939 } 940 func (m *Stats) Unmarshal(dAtA []byte) error { 941 l := len(dAtA) 942 iNdEx := 0 943 for iNdEx < l { 944 preIndex := iNdEx 945 var wire uint64 946 for shift := uint(0); ; shift += 7 { 947 if shift >= 64 { 948 return ErrIntOverflowTable 949 } 950 if iNdEx >= l { 951 return io.ErrUnexpectedEOF 952 } 953 b := dAtA[iNdEx] 954 iNdEx++ 955 wire |= uint64(b&0x7F) << shift 956 if b < 0x80 { 957 break 958 } 959 } 960 fieldNum := int32(wire >> 3) 961 wireType := int(wire & 0x7) 962 if wireType == 4 { 963 return fmt.Errorf("proto: Stats: wiretype end group for non-group") 964 } 965 if fieldNum <= 0 { 966 return fmt.Errorf("proto: Stats: illegal tag %d (wire type %d)", fieldNum, wire) 967 } 968 switch fieldNum { 969 case 1: 970 if wireType != 0 { 971 return fmt.Errorf("proto: wrong wireType = %d for field RegionCount", wireType) 972 } 973 m.RegionCount = 0 974 for shift := uint(0); ; shift += 7 { 975 if shift >= 64 { 976 return ErrIntOverflowTable 977 } 978 if iNdEx >= l { 979 return io.ErrUnexpectedEOF 980 } 981 b := dAtA[iNdEx] 982 iNdEx++ 983 m.RegionCount |= uint64(b&0x7F) << shift 984 if b < 0x80 { 985 break 986 } 987 } 988 case 2: 989 if wireType != 0 { 990 return fmt.Errorf("proto: wrong wireType = %d for field CurrentTs", wireType) 991 } 992 m.CurrentTs = 0 993 for shift := uint(0); ; shift += 7 { 994 if shift >= 64 { 995 return ErrIntOverflowTable 996 } 997 if iNdEx >= l { 998 return io.ErrUnexpectedEOF 999 } 1000 b := dAtA[iNdEx] 1001 iNdEx++ 1002 m.CurrentTs |= Ts(b&0x7F) << shift 1003 if b < 0x80 { 1004 break 1005 } 1006 } 1007 case 3: 1008 if wireType != 2 { 1009 return fmt.Errorf("proto: wrong wireType = %d for field StageCheckpoints", wireType) 1010 } 1011 var msglen int 1012 for shift := uint(0); ; shift += 7 { 1013 if shift >= 64 { 1014 return ErrIntOverflowTable 1015 } 1016 if iNdEx >= l { 1017 return io.ErrUnexpectedEOF 1018 } 1019 b := dAtA[iNdEx] 1020 iNdEx++ 1021 msglen |= int(b&0x7F) << shift 1022 if b < 0x80 { 1023 break 1024 } 1025 } 1026 if msglen < 0 { 1027 return ErrInvalidLengthTable 1028 } 1029 postIndex := iNdEx + msglen 1030 if postIndex < 0 { 1031 return ErrInvalidLengthTable 1032 } 1033 if postIndex > l { 1034 return io.ErrUnexpectedEOF 1035 } 1036 if m.StageCheckpoints == nil { 1037 m.StageCheckpoints = make(map[string]Checkpoint) 1038 } 1039 var mapkey string 1040 mapvalue := &Checkpoint{} 1041 for iNdEx < postIndex { 1042 entryPreIndex := iNdEx 1043 var wire uint64 1044 for shift := uint(0); ; shift += 7 { 1045 if shift >= 64 { 1046 return ErrIntOverflowTable 1047 } 1048 if iNdEx >= l { 1049 return io.ErrUnexpectedEOF 1050 } 1051 b := dAtA[iNdEx] 1052 iNdEx++ 1053 wire |= uint64(b&0x7F) << shift 1054 if b < 0x80 { 1055 break 1056 } 1057 } 1058 fieldNum := int32(wire >> 3) 1059 if fieldNum == 1 { 1060 var stringLenmapkey uint64 1061 for shift := uint(0); ; shift += 7 { 1062 if shift >= 64 { 1063 return ErrIntOverflowTable 1064 } 1065 if iNdEx >= l { 1066 return io.ErrUnexpectedEOF 1067 } 1068 b := dAtA[iNdEx] 1069 iNdEx++ 1070 stringLenmapkey |= uint64(b&0x7F) << shift 1071 if b < 0x80 { 1072 break 1073 } 1074 } 1075 intStringLenmapkey := int(stringLenmapkey) 1076 if intStringLenmapkey < 0 { 1077 return ErrInvalidLengthTable 1078 } 1079 postStringIndexmapkey := iNdEx + intStringLenmapkey 1080 if postStringIndexmapkey < 0 { 1081 return ErrInvalidLengthTable 1082 } 1083 if postStringIndexmapkey > l { 1084 return io.ErrUnexpectedEOF 1085 } 1086 mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) 1087 iNdEx = postStringIndexmapkey 1088 } else if fieldNum == 2 { 1089 var mapmsglen int 1090 for shift := uint(0); ; shift += 7 { 1091 if shift >= 64 { 1092 return ErrIntOverflowTable 1093 } 1094 if iNdEx >= l { 1095 return io.ErrUnexpectedEOF 1096 } 1097 b := dAtA[iNdEx] 1098 iNdEx++ 1099 mapmsglen |= int(b&0x7F) << shift 1100 if b < 0x80 { 1101 break 1102 } 1103 } 1104 if mapmsglen < 0 { 1105 return ErrInvalidLengthTable 1106 } 1107 postmsgIndex := iNdEx + mapmsglen 1108 if postmsgIndex < 0 { 1109 return ErrInvalidLengthTable 1110 } 1111 if postmsgIndex > l { 1112 return io.ErrUnexpectedEOF 1113 } 1114 mapvalue = &Checkpoint{} 1115 if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { 1116 return err 1117 } 1118 iNdEx = postmsgIndex 1119 } else { 1120 iNdEx = entryPreIndex 1121 skippy, err := skipTable(dAtA[iNdEx:]) 1122 if err != nil { 1123 return err 1124 } 1125 if (skippy < 0) || (iNdEx+skippy) < 0 { 1126 return ErrInvalidLengthTable 1127 } 1128 if (iNdEx + skippy) > postIndex { 1129 return io.ErrUnexpectedEOF 1130 } 1131 iNdEx += skippy 1132 } 1133 } 1134 m.StageCheckpoints[mapkey] = *mapvalue 1135 iNdEx = postIndex 1136 case 4: 1137 if wireType != 0 { 1138 return fmt.Errorf("proto: wrong wireType = %d for field BarrierTs", wireType) 1139 } 1140 m.BarrierTs = 0 1141 for shift := uint(0); ; shift += 7 { 1142 if shift >= 64 { 1143 return ErrIntOverflowTable 1144 } 1145 if iNdEx >= l { 1146 return io.ErrUnexpectedEOF 1147 } 1148 b := dAtA[iNdEx] 1149 iNdEx++ 1150 m.BarrierTs |= Ts(b&0x7F) << shift 1151 if b < 0x80 { 1152 break 1153 } 1154 } 1155 default: 1156 iNdEx = preIndex 1157 skippy, err := skipTable(dAtA[iNdEx:]) 1158 if err != nil { 1159 return err 1160 } 1161 if (skippy < 0) || (iNdEx+skippy) < 0 { 1162 return ErrInvalidLengthTable 1163 } 1164 if (iNdEx + skippy) > l { 1165 return io.ErrUnexpectedEOF 1166 } 1167 iNdEx += skippy 1168 } 1169 } 1170 1171 if iNdEx > l { 1172 return io.ErrUnexpectedEOF 1173 } 1174 return nil 1175 } 1176 func (m *TableStatus) Unmarshal(dAtA []byte) error { 1177 l := len(dAtA) 1178 iNdEx := 0 1179 for iNdEx < l { 1180 preIndex := iNdEx 1181 var wire uint64 1182 for shift := uint(0); ; shift += 7 { 1183 if shift >= 64 { 1184 return ErrIntOverflowTable 1185 } 1186 if iNdEx >= l { 1187 return io.ErrUnexpectedEOF 1188 } 1189 b := dAtA[iNdEx] 1190 iNdEx++ 1191 wire |= uint64(b&0x7F) << shift 1192 if b < 0x80 { 1193 break 1194 } 1195 } 1196 fieldNum := int32(wire >> 3) 1197 wireType := int(wire & 0x7) 1198 if wireType == 4 { 1199 return fmt.Errorf("proto: TableStatus: wiretype end group for non-group") 1200 } 1201 if fieldNum <= 0 { 1202 return fmt.Errorf("proto: TableStatus: illegal tag %d (wire type %d)", fieldNum, wire) 1203 } 1204 switch fieldNum { 1205 case 1: 1206 if wireType != 0 { 1207 return fmt.Errorf("proto: wrong wireType = %d for field TableID", wireType) 1208 } 1209 m.TableID = 0 1210 for shift := uint(0); ; shift += 7 { 1211 if shift >= 64 { 1212 return ErrIntOverflowTable 1213 } 1214 if iNdEx >= l { 1215 return io.ErrUnexpectedEOF 1216 } 1217 b := dAtA[iNdEx] 1218 iNdEx++ 1219 m.TableID |= TableID(b&0x7F) << shift 1220 if b < 0x80 { 1221 break 1222 } 1223 } 1224 case 2: 1225 if wireType != 0 { 1226 return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) 1227 } 1228 m.State = 0 1229 for shift := uint(0); ; shift += 7 { 1230 if shift >= 64 { 1231 return ErrIntOverflowTable 1232 } 1233 if iNdEx >= l { 1234 return io.ErrUnexpectedEOF 1235 } 1236 b := dAtA[iNdEx] 1237 iNdEx++ 1238 m.State |= TableState(b&0x7F) << shift 1239 if b < 0x80 { 1240 break 1241 } 1242 } 1243 case 3: 1244 if wireType != 2 { 1245 return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) 1246 } 1247 var msglen int 1248 for shift := uint(0); ; shift += 7 { 1249 if shift >= 64 { 1250 return ErrIntOverflowTable 1251 } 1252 if iNdEx >= l { 1253 return io.ErrUnexpectedEOF 1254 } 1255 b := dAtA[iNdEx] 1256 iNdEx++ 1257 msglen |= int(b&0x7F) << shift 1258 if b < 0x80 { 1259 break 1260 } 1261 } 1262 if msglen < 0 { 1263 return ErrInvalidLengthTable 1264 } 1265 postIndex := iNdEx + msglen 1266 if postIndex < 0 { 1267 return ErrInvalidLengthTable 1268 } 1269 if postIndex > l { 1270 return io.ErrUnexpectedEOF 1271 } 1272 if err := m.Checkpoint.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1273 return err 1274 } 1275 iNdEx = postIndex 1276 case 4: 1277 if wireType != 2 { 1278 return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) 1279 } 1280 var msglen int 1281 for shift := uint(0); ; shift += 7 { 1282 if shift >= 64 { 1283 return ErrIntOverflowTable 1284 } 1285 if iNdEx >= l { 1286 return io.ErrUnexpectedEOF 1287 } 1288 b := dAtA[iNdEx] 1289 iNdEx++ 1290 msglen |= int(b&0x7F) << shift 1291 if b < 0x80 { 1292 break 1293 } 1294 } 1295 if msglen < 0 { 1296 return ErrInvalidLengthTable 1297 } 1298 postIndex := iNdEx + msglen 1299 if postIndex < 0 { 1300 return ErrInvalidLengthTable 1301 } 1302 if postIndex > l { 1303 return io.ErrUnexpectedEOF 1304 } 1305 if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1306 return err 1307 } 1308 iNdEx = postIndex 1309 case 5: 1310 if wireType != 2 { 1311 return fmt.Errorf("proto: wrong wireType = %d for field Span", wireType) 1312 } 1313 var msglen int 1314 for shift := uint(0); ; shift += 7 { 1315 if shift >= 64 { 1316 return ErrIntOverflowTable 1317 } 1318 if iNdEx >= l { 1319 return io.ErrUnexpectedEOF 1320 } 1321 b := dAtA[iNdEx] 1322 iNdEx++ 1323 msglen |= int(b&0x7F) << shift 1324 if b < 0x80 { 1325 break 1326 } 1327 } 1328 if msglen < 0 { 1329 return ErrInvalidLengthTable 1330 } 1331 postIndex := iNdEx + msglen 1332 if postIndex < 0 { 1333 return ErrInvalidLengthTable 1334 } 1335 if postIndex > l { 1336 return io.ErrUnexpectedEOF 1337 } 1338 if err := m.Span.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1339 return err 1340 } 1341 iNdEx = postIndex 1342 default: 1343 iNdEx = preIndex 1344 skippy, err := skipTable(dAtA[iNdEx:]) 1345 if err != nil { 1346 return err 1347 } 1348 if (skippy < 0) || (iNdEx+skippy) < 0 { 1349 return ErrInvalidLengthTable 1350 } 1351 if (iNdEx + skippy) > l { 1352 return io.ErrUnexpectedEOF 1353 } 1354 iNdEx += skippy 1355 } 1356 } 1357 1358 if iNdEx > l { 1359 return io.ErrUnexpectedEOF 1360 } 1361 return nil 1362 } 1363 func skipTable(dAtA []byte) (n int, err error) { 1364 l := len(dAtA) 1365 iNdEx := 0 1366 depth := 0 1367 for iNdEx < l { 1368 var wire uint64 1369 for shift := uint(0); ; shift += 7 { 1370 if shift >= 64 { 1371 return 0, ErrIntOverflowTable 1372 } 1373 if iNdEx >= l { 1374 return 0, io.ErrUnexpectedEOF 1375 } 1376 b := dAtA[iNdEx] 1377 iNdEx++ 1378 wire |= (uint64(b) & 0x7F) << shift 1379 if b < 0x80 { 1380 break 1381 } 1382 } 1383 wireType := int(wire & 0x7) 1384 switch wireType { 1385 case 0: 1386 for shift := uint(0); ; shift += 7 { 1387 if shift >= 64 { 1388 return 0, ErrIntOverflowTable 1389 } 1390 if iNdEx >= l { 1391 return 0, io.ErrUnexpectedEOF 1392 } 1393 iNdEx++ 1394 if dAtA[iNdEx-1] < 0x80 { 1395 break 1396 } 1397 } 1398 case 1: 1399 iNdEx += 8 1400 case 2: 1401 var length int 1402 for shift := uint(0); ; shift += 7 { 1403 if shift >= 64 { 1404 return 0, ErrIntOverflowTable 1405 } 1406 if iNdEx >= l { 1407 return 0, io.ErrUnexpectedEOF 1408 } 1409 b := dAtA[iNdEx] 1410 iNdEx++ 1411 length |= (int(b) & 0x7F) << shift 1412 if b < 0x80 { 1413 break 1414 } 1415 } 1416 if length < 0 { 1417 return 0, ErrInvalidLengthTable 1418 } 1419 iNdEx += length 1420 case 3: 1421 depth++ 1422 case 4: 1423 if depth == 0 { 1424 return 0, ErrUnexpectedEndOfGroupTable 1425 } 1426 depth-- 1427 case 5: 1428 iNdEx += 4 1429 default: 1430 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1431 } 1432 if iNdEx < 0 { 1433 return 0, ErrInvalidLengthTable 1434 } 1435 if depth == 0 { 1436 return iNdEx, nil 1437 } 1438 } 1439 return 0, io.ErrUnexpectedEOF 1440 } 1441 1442 var ( 1443 ErrInvalidLengthTable = fmt.Errorf("proto: negative length found during unmarshaling") 1444 ErrIntOverflowTable = fmt.Errorf("proto: integer overflow") 1445 ErrUnexpectedEndOfGroupTable = fmt.Errorf("proto: unexpected end of group") 1446 )