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