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

Method Unmarshal

pkg/ruler/ruler.pb.go:2334–2405  ·  view source on GitHub ↗
(dAtA []byte)

Source from the content-addressed store, hash-verified

2332 return nil
2333}
2334func (m *LivenessCheckResponse) Unmarshal(dAtA []byte) error {
2335 l := len(dAtA)
2336 iNdEx := 0
2337 for iNdEx < l {
2338 preIndex := iNdEx
2339 var wire uint64
2340 for shift := uint(0); ; shift += 7 {
2341 if shift >= 64 {
2342 return ErrIntOverflowRuler
2343 }
2344 if iNdEx >= l {
2345 return io.ErrUnexpectedEOF
2346 }
2347 b := dAtA[iNdEx]
2348 iNdEx++
2349 wire |= uint64(b&0x7F) << shift
2350 if b < 0x80 {
2351 break
2352 }
2353 }
2354 fieldNum := int32(wire >> 3)
2355 wireType := int(wire & 0x7)
2356 if wireType == 4 {
2357 return fmt.Errorf("proto: LivenessCheckResponse: wiretype end group for non-group")
2358 }
2359 if fieldNum <= 0 {
2360 return fmt.Errorf("proto: LivenessCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire)
2361 }
2362 switch fieldNum {
2363 case 1:
2364 if wireType != 0 {
2365 return fmt.Errorf("proto: wrong wireType = %d for field State", wireType)
2366 }
2367 m.State = 0
2368 for shift := uint(0); ; shift += 7 {
2369 if shift >= 64 {
2370 return ErrIntOverflowRuler
2371 }
2372 if iNdEx >= l {
2373 return io.ErrUnexpectedEOF
2374 }
2375 b := dAtA[iNdEx]
2376 iNdEx++
2377 m.State |= int32(b&0x7F) << shift
2378 if b < 0x80 {
2379 break
2380 }
2381 }
2382 default:
2383 iNdEx = preIndex
2384 skippy, err := skipRuler(dAtA[iNdEx:])
2385 if err != nil {
2386 return err
2387 }
2388 if skippy < 0 {
2389 return ErrInvalidLengthRuler
2390 }
2391 if (iNdEx + skippy) < 0 {

Callers 1

XXX_UnmarshalMethod · 0.95

Calls 1

skipRulerFunction · 0.85

Tested by

no test coverage detected