MCPcopy Create free account
hub / github.com/cortexproject/cortex / Unmarshal

Method Unmarshal

pkg/cortexpb/cortex.pb.go:5432–5592  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

5430 return nil
5431}
5432func (m *WriteResponse) Unmarshal(dAtA []byte) error {
5433 l := len(dAtA)
5434 iNdEx := 0
5435 for iNdEx < l {
5436 preIndex := iNdEx
5437 var wire uint64
5438 for shift := uint(0); ; shift += 7 {
5439 if shift >= 64 {
5440 return ErrIntOverflowCortex
5441 }
5442 if iNdEx >= l {
5443 return io.ErrUnexpectedEOF
5444 }
5445 b := dAtA[iNdEx]
5446 iNdEx++
5447 wire |= uint64(b&0x7F) << shift
5448 if b < 0x80 {
5449 break
5450 }
5451 }
5452 fieldNum := int32(wire >> 3)
5453 wireType := int(wire & 0x7)
5454 if wireType == 4 {
5455 return fmt.Errorf("proto: WriteResponse: wiretype end group for non-group")
5456 }
5457 if fieldNum <= 0 {
5458 return fmt.Errorf("proto: WriteResponse: illegal tag %d (wire type %d)", fieldNum, wire)
5459 }
5460 switch fieldNum {
5461 case 1:
5462 if wireType != 0 {
5463 return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
5464 }
5465 m.Code = 0
5466 for shift := uint(0); ; shift += 7 {
5467 if shift >= 64 {
5468 return ErrIntOverflowCortex
5469 }
5470 if iNdEx >= l {
5471 return io.ErrUnexpectedEOF
5472 }
5473 b := dAtA[iNdEx]
5474 iNdEx++
5475 m.Code |= int32(b&0x7F) << shift
5476 if b < 0x80 {
5477 break
5478 }
5479 }
5480 case 2:
5481 if wireType != 2 {
5482 return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType)
5483 }
5484 var stringLen uint64
5485 for shift := uint(0); ; shift += 7 {
5486 if shift >= 64 {
5487 return ErrIntOverflowCortex
5488 }
5489 if iNdEx >= l {

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipCortexFunction · 0.85

Tested by

no test coverage detected