github.com/muhammadn/cortex@v1.9.1-0.20220510110439-46bb7000d03d/pkg/distributor/ha_tracker.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: ha_tracker.proto 3 4 package distributor 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 reflect "reflect" 14 strings "strings" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 27 28 type ReplicaDesc struct { 29 Replica string `protobuf:"bytes,1,opt,name=replica,proto3" json:"replica,omitempty"` 30 ReceivedAt int64 `protobuf:"varint,2,opt,name=received_at,json=receivedAt,proto3" json:"received_at,omitempty"` 31 // Unix timestamp in millseconds when this entry was marked for deletion. 32 // Reason for doing marking first, and delete later, is to make sure that distributors 33 // watching the prefix will receive notification on "marking" -- at which point they can 34 // already remove entry from memory. Actual deletion from KV store does *not* trigger 35 // "watch" notification with a key for all KV stores. 36 DeletedAt int64 `protobuf:"varint,3,opt,name=deleted_at,json=deletedAt,proto3" json:"deleted_at,omitempty"` 37 } 38 39 func (m *ReplicaDesc) Reset() { *m = ReplicaDesc{} } 40 func (*ReplicaDesc) ProtoMessage() {} 41 func (*ReplicaDesc) Descriptor() ([]byte, []int) { 42 return fileDescriptor_86f0e7bcf71d860b, []int{0} 43 } 44 func (m *ReplicaDesc) XXX_Unmarshal(b []byte) error { 45 return m.Unmarshal(b) 46 } 47 func (m *ReplicaDesc) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 48 if deterministic { 49 return xxx_messageInfo_ReplicaDesc.Marshal(b, m, deterministic) 50 } else { 51 b = b[:cap(b)] 52 n, err := m.MarshalToSizedBuffer(b) 53 if err != nil { 54 return nil, err 55 } 56 return b[:n], nil 57 } 58 } 59 func (m *ReplicaDesc) XXX_Merge(src proto.Message) { 60 xxx_messageInfo_ReplicaDesc.Merge(m, src) 61 } 62 func (m *ReplicaDesc) XXX_Size() int { 63 return m.Size() 64 } 65 func (m *ReplicaDesc) XXX_DiscardUnknown() { 66 xxx_messageInfo_ReplicaDesc.DiscardUnknown(m) 67 } 68 69 var xxx_messageInfo_ReplicaDesc proto.InternalMessageInfo 70 71 func (m *ReplicaDesc) GetReplica() string { 72 if m != nil { 73 return m.Replica 74 } 75 return "" 76 } 77 78 func (m *ReplicaDesc) GetReceivedAt() int64 { 79 if m != nil { 80 return m.ReceivedAt 81 } 82 return 0 83 } 84 85 func (m *ReplicaDesc) GetDeletedAt() int64 { 86 if m != nil { 87 return m.DeletedAt 88 } 89 return 0 90 } 91 92 func init() { 93 proto.RegisterType((*ReplicaDesc)(nil), "distributor.ReplicaDesc") 94 } 95 96 func init() { proto.RegisterFile("ha_tracker.proto", fileDescriptor_86f0e7bcf71d860b) } 97 98 var fileDescriptor_86f0e7bcf71d860b = []byte{ 99 // 224 bytes of a gzipped FileDescriptorProto 100 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0x48, 0x8c, 0x2f, 101 0x29, 0x4a, 0x4c, 0xce, 0x4e, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4e, 0xc9, 102 0x2c, 0x2e, 0x29, 0xca, 0x4c, 0x2a, 0x2d, 0xc9, 0x2f, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 103 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0xab, 0x49, 0x2a, 0x4d, 104 0x03, 0xf3, 0xc0, 0x1c, 0x30, 0x0b, 0xa2, 0x57, 0x29, 0x9d, 0x8b, 0x3b, 0x28, 0xb5, 0x20, 0x27, 105 0x33, 0x39, 0xd1, 0x25, 0xb5, 0x38, 0x59, 0x48, 0x82, 0x8b, 0xbd, 0x08, 0xc2, 0x95, 0x60, 0x54, 106 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x71, 0x85, 0xe4, 0xb9, 0xb8, 0x8b, 0x52, 0x93, 0x53, 0x33, 0xcb, 107 0x52, 0x53, 0xe2, 0x13, 0x4b, 0x24, 0x98, 0x14, 0x18, 0x35, 0x98, 0x83, 0xb8, 0x60, 0x42, 0x8e, 108 0x25, 0x42, 0xb2, 0x5c, 0x5c, 0x29, 0xa9, 0x39, 0xa9, 0x25, 0x10, 0x79, 0x66, 0xb0, 0x3c, 0x27, 109 0x54, 0xc4, 0xb1, 0xc4, 0xc9, 0xe4, 0xc2, 0x43, 0x39, 0x86, 0x1b, 0x0f, 0xe5, 0x18, 0x3e, 0x3c, 110 0x94, 0x63, 0x6c, 0x78, 0x24, 0xc7, 0xb8, 0xe2, 0x91, 0x1c, 0xe3, 0x89, 0x47, 0x72, 0x8c, 0x17, 111 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0xf8, 0xe2, 0x91, 0x1c, 0xc3, 0x87, 0x47, 0x72, 0x8c, 112 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x12, 0x1b, 0xd8, 113 0x95, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb3, 0xd1, 0xdd, 0x8d, 0xf5, 0x00, 0x00, 0x00, 114 } 115 116 func (this *ReplicaDesc) Equal(that interface{}) bool { 117 if that == nil { 118 return this == nil 119 } 120 121 that1, ok := that.(*ReplicaDesc) 122 if !ok { 123 that2, ok := that.(ReplicaDesc) 124 if ok { 125 that1 = &that2 126 } else { 127 return false 128 } 129 } 130 if that1 == nil { 131 return this == nil 132 } else if this == nil { 133 return false 134 } 135 if this.Replica != that1.Replica { 136 return false 137 } 138 if this.ReceivedAt != that1.ReceivedAt { 139 return false 140 } 141 if this.DeletedAt != that1.DeletedAt { 142 return false 143 } 144 return true 145 } 146 func (this *ReplicaDesc) GoString() string { 147 if this == nil { 148 return "nil" 149 } 150 s := make([]string, 0, 7) 151 s = append(s, "&distributor.ReplicaDesc{") 152 s = append(s, "Replica: "+fmt.Sprintf("%#v", this.Replica)+",\n") 153 s = append(s, "ReceivedAt: "+fmt.Sprintf("%#v", this.ReceivedAt)+",\n") 154 s = append(s, "DeletedAt: "+fmt.Sprintf("%#v", this.DeletedAt)+",\n") 155 s = append(s, "}") 156 return strings.Join(s, "") 157 } 158 func valueToGoStringHaTracker(v interface{}, typ string) string { 159 rv := reflect.ValueOf(v) 160 if rv.IsNil() { 161 return "nil" 162 } 163 pv := reflect.Indirect(rv).Interface() 164 return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) 165 } 166 func (m *ReplicaDesc) Marshal() (dAtA []byte, err error) { 167 size := m.Size() 168 dAtA = make([]byte, size) 169 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 170 if err != nil { 171 return nil, err 172 } 173 return dAtA[:n], nil 174 } 175 176 func (m *ReplicaDesc) MarshalTo(dAtA []byte) (int, error) { 177 size := m.Size() 178 return m.MarshalToSizedBuffer(dAtA[:size]) 179 } 180 181 func (m *ReplicaDesc) MarshalToSizedBuffer(dAtA []byte) (int, error) { 182 i := len(dAtA) 183 _ = i 184 var l int 185 _ = l 186 if m.DeletedAt != 0 { 187 i = encodeVarintHaTracker(dAtA, i, uint64(m.DeletedAt)) 188 i-- 189 dAtA[i] = 0x18 190 } 191 if m.ReceivedAt != 0 { 192 i = encodeVarintHaTracker(dAtA, i, uint64(m.ReceivedAt)) 193 i-- 194 dAtA[i] = 0x10 195 } 196 if len(m.Replica) > 0 { 197 i -= len(m.Replica) 198 copy(dAtA[i:], m.Replica) 199 i = encodeVarintHaTracker(dAtA, i, uint64(len(m.Replica))) 200 i-- 201 dAtA[i] = 0xa 202 } 203 return len(dAtA) - i, nil 204 } 205 206 func encodeVarintHaTracker(dAtA []byte, offset int, v uint64) int { 207 offset -= sovHaTracker(v) 208 base := offset 209 for v >= 1<<7 { 210 dAtA[offset] = uint8(v&0x7f | 0x80) 211 v >>= 7 212 offset++ 213 } 214 dAtA[offset] = uint8(v) 215 return base 216 } 217 func (m *ReplicaDesc) Size() (n int) { 218 if m == nil { 219 return 0 220 } 221 var l int 222 _ = l 223 l = len(m.Replica) 224 if l > 0 { 225 n += 1 + l + sovHaTracker(uint64(l)) 226 } 227 if m.ReceivedAt != 0 { 228 n += 1 + sovHaTracker(uint64(m.ReceivedAt)) 229 } 230 if m.DeletedAt != 0 { 231 n += 1 + sovHaTracker(uint64(m.DeletedAt)) 232 } 233 return n 234 } 235 236 func sovHaTracker(x uint64) (n int) { 237 return (math_bits.Len64(x|1) + 6) / 7 238 } 239 func sozHaTracker(x uint64) (n int) { 240 return sovHaTracker(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 241 } 242 func (this *ReplicaDesc) String() string { 243 if this == nil { 244 return "nil" 245 } 246 s := strings.Join([]string{`&ReplicaDesc{`, 247 `Replica:` + fmt.Sprintf("%v", this.Replica) + `,`, 248 `ReceivedAt:` + fmt.Sprintf("%v", this.ReceivedAt) + `,`, 249 `DeletedAt:` + fmt.Sprintf("%v", this.DeletedAt) + `,`, 250 `}`, 251 }, "") 252 return s 253 } 254 func valueToStringHaTracker(v interface{}) string { 255 rv := reflect.ValueOf(v) 256 if rv.IsNil() { 257 return "nil" 258 } 259 pv := reflect.Indirect(rv).Interface() 260 return fmt.Sprintf("*%v", pv) 261 } 262 func (m *ReplicaDesc) Unmarshal(dAtA []byte) error { 263 l := len(dAtA) 264 iNdEx := 0 265 for iNdEx < l { 266 preIndex := iNdEx 267 var wire uint64 268 for shift := uint(0); ; shift += 7 { 269 if shift >= 64 { 270 return ErrIntOverflowHaTracker 271 } 272 if iNdEx >= l { 273 return io.ErrUnexpectedEOF 274 } 275 b := dAtA[iNdEx] 276 iNdEx++ 277 wire |= uint64(b&0x7F) << shift 278 if b < 0x80 { 279 break 280 } 281 } 282 fieldNum := int32(wire >> 3) 283 wireType := int(wire & 0x7) 284 if wireType == 4 { 285 return fmt.Errorf("proto: ReplicaDesc: wiretype end group for non-group") 286 } 287 if fieldNum <= 0 { 288 return fmt.Errorf("proto: ReplicaDesc: illegal tag %d (wire type %d)", fieldNum, wire) 289 } 290 switch fieldNum { 291 case 1: 292 if wireType != 2 { 293 return fmt.Errorf("proto: wrong wireType = %d for field Replica", wireType) 294 } 295 var stringLen uint64 296 for shift := uint(0); ; shift += 7 { 297 if shift >= 64 { 298 return ErrIntOverflowHaTracker 299 } 300 if iNdEx >= l { 301 return io.ErrUnexpectedEOF 302 } 303 b := dAtA[iNdEx] 304 iNdEx++ 305 stringLen |= uint64(b&0x7F) << shift 306 if b < 0x80 { 307 break 308 } 309 } 310 intStringLen := int(stringLen) 311 if intStringLen < 0 { 312 return ErrInvalidLengthHaTracker 313 } 314 postIndex := iNdEx + intStringLen 315 if postIndex < 0 { 316 return ErrInvalidLengthHaTracker 317 } 318 if postIndex > l { 319 return io.ErrUnexpectedEOF 320 } 321 m.Replica = string(dAtA[iNdEx:postIndex]) 322 iNdEx = postIndex 323 case 2: 324 if wireType != 0 { 325 return fmt.Errorf("proto: wrong wireType = %d for field ReceivedAt", wireType) 326 } 327 m.ReceivedAt = 0 328 for shift := uint(0); ; shift += 7 { 329 if shift >= 64 { 330 return ErrIntOverflowHaTracker 331 } 332 if iNdEx >= l { 333 return io.ErrUnexpectedEOF 334 } 335 b := dAtA[iNdEx] 336 iNdEx++ 337 m.ReceivedAt |= int64(b&0x7F) << shift 338 if b < 0x80 { 339 break 340 } 341 } 342 case 3: 343 if wireType != 0 { 344 return fmt.Errorf("proto: wrong wireType = %d for field DeletedAt", wireType) 345 } 346 m.DeletedAt = 0 347 for shift := uint(0); ; shift += 7 { 348 if shift >= 64 { 349 return ErrIntOverflowHaTracker 350 } 351 if iNdEx >= l { 352 return io.ErrUnexpectedEOF 353 } 354 b := dAtA[iNdEx] 355 iNdEx++ 356 m.DeletedAt |= int64(b&0x7F) << shift 357 if b < 0x80 { 358 break 359 } 360 } 361 default: 362 iNdEx = preIndex 363 skippy, err := skipHaTracker(dAtA[iNdEx:]) 364 if err != nil { 365 return err 366 } 367 if skippy < 0 { 368 return ErrInvalidLengthHaTracker 369 } 370 if (iNdEx + skippy) < 0 { 371 return ErrInvalidLengthHaTracker 372 } 373 if (iNdEx + skippy) > l { 374 return io.ErrUnexpectedEOF 375 } 376 iNdEx += skippy 377 } 378 } 379 380 if iNdEx > l { 381 return io.ErrUnexpectedEOF 382 } 383 return nil 384 } 385 func skipHaTracker(dAtA []byte) (n int, err error) { 386 l := len(dAtA) 387 iNdEx := 0 388 for iNdEx < l { 389 var wire uint64 390 for shift := uint(0); ; shift += 7 { 391 if shift >= 64 { 392 return 0, ErrIntOverflowHaTracker 393 } 394 if iNdEx >= l { 395 return 0, io.ErrUnexpectedEOF 396 } 397 b := dAtA[iNdEx] 398 iNdEx++ 399 wire |= (uint64(b) & 0x7F) << shift 400 if b < 0x80 { 401 break 402 } 403 } 404 wireType := int(wire & 0x7) 405 switch wireType { 406 case 0: 407 for shift := uint(0); ; shift += 7 { 408 if shift >= 64 { 409 return 0, ErrIntOverflowHaTracker 410 } 411 if iNdEx >= l { 412 return 0, io.ErrUnexpectedEOF 413 } 414 iNdEx++ 415 if dAtA[iNdEx-1] < 0x80 { 416 break 417 } 418 } 419 return iNdEx, nil 420 case 1: 421 iNdEx += 8 422 return iNdEx, nil 423 case 2: 424 var length int 425 for shift := uint(0); ; shift += 7 { 426 if shift >= 64 { 427 return 0, ErrIntOverflowHaTracker 428 } 429 if iNdEx >= l { 430 return 0, io.ErrUnexpectedEOF 431 } 432 b := dAtA[iNdEx] 433 iNdEx++ 434 length |= (int(b) & 0x7F) << shift 435 if b < 0x80 { 436 break 437 } 438 } 439 if length < 0 { 440 return 0, ErrInvalidLengthHaTracker 441 } 442 iNdEx += length 443 if iNdEx < 0 { 444 return 0, ErrInvalidLengthHaTracker 445 } 446 return iNdEx, nil 447 case 3: 448 for { 449 var innerWire uint64 450 var start int = iNdEx 451 for shift := uint(0); ; shift += 7 { 452 if shift >= 64 { 453 return 0, ErrIntOverflowHaTracker 454 } 455 if iNdEx >= l { 456 return 0, io.ErrUnexpectedEOF 457 } 458 b := dAtA[iNdEx] 459 iNdEx++ 460 innerWire |= (uint64(b) & 0x7F) << shift 461 if b < 0x80 { 462 break 463 } 464 } 465 innerWireType := int(innerWire & 0x7) 466 if innerWireType == 4 { 467 break 468 } 469 next, err := skipHaTracker(dAtA[start:]) 470 if err != nil { 471 return 0, err 472 } 473 iNdEx = start + next 474 if iNdEx < 0 { 475 return 0, ErrInvalidLengthHaTracker 476 } 477 } 478 return iNdEx, nil 479 case 4: 480 return iNdEx, nil 481 case 5: 482 iNdEx += 4 483 return iNdEx, nil 484 default: 485 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 486 } 487 } 488 panic("unreachable") 489 } 490 491 var ( 492 ErrInvalidLengthHaTracker = fmt.Errorf("proto: negative length found during unmarshaling") 493 ErrIntOverflowHaTracker = fmt.Errorf("proto: integer overflow") 494 )