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

Method Unmarshal

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

Source from the content-addressed store, hash-verified

4267 return fmt.Sprintf("*%v", pv)
4268}
4269func (m *MessageWithBufRef) Unmarshal(dAtA []byte) error {
4270 l := len(dAtA)
4271 iNdEx := 0
4272 for iNdEx < l {
4273 preIndex := iNdEx
4274 var wire uint64
4275 for shift := uint(0); ; shift += 7 {
4276 if shift >= 64 {
4277 return ErrIntOverflowCortex
4278 }
4279 if iNdEx >= l {
4280 return io.ErrUnexpectedEOF
4281 }
4282 b := dAtA[iNdEx]
4283 iNdEx++
4284 wire |= uint64(b&0x7F) << shift
4285 if b < 0x80 {
4286 break
4287 }
4288 }
4289 fieldNum := int32(wire >> 3)
4290 wireType := int(wire & 0x7)
4291 if wireType == 4 {
4292 return fmt.Errorf("proto: MessageWithBufRef: wiretype end group for non-group")
4293 }
4294 if fieldNum <= 0 {
4295 return fmt.Errorf("proto: MessageWithBufRef: illegal tag %d (wire type %d)", fieldNum, wire)
4296 }
4297 switch fieldNum {
4298 default:
4299 iNdEx = preIndex
4300 skippy, err := skipCortex(dAtA[iNdEx:])
4301 if err != nil {
4302 return err
4303 }
4304 if skippy < 0 {
4305 return ErrInvalidLengthCortex
4306 }
4307 if (iNdEx + skippy) < 0 {
4308 return ErrInvalidLengthCortex
4309 }
4310 if (iNdEx + skippy) > l {
4311 return io.ErrUnexpectedEOF
4312 }
4313 iNdEx += skippy
4314 }
4315 }
4316
4317 if iNdEx > l {
4318 return io.ErrUnexpectedEOF
4319 }
4320 return nil
4321}
4322func (m *WriteRequest) Unmarshal(dAtA []byte) error {
4323 l := len(dAtA)
4324 iNdEx := 0

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipCortexFunction · 0.85

Tested by

no test coverage detected