MCPcopy Create free account
hub / github.com/apache/iotdb-client-go / Read

Method Read

common/common.go:6957–7003  ·  view source on GitHub ↗
(ctx context.Context, iprot thrift.TProtocol)

Source from the content-addressed store, hash-verified

6955}
6956
6957func (p *TNodeLocations) Read(ctx context.Context, iprot thrift.TProtocol) error {
6958 if _, err := iprot.ReadStructBegin(ctx); err != nil {
6959 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
6960 }
6961
6962
6963 for {
6964 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
6965 if err != nil {
6966 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
6967 }
6968 if fieldTypeId == thrift.STOP { break; }
6969 switch fieldId {
6970 case 1:
6971 if fieldTypeId == thrift.LIST {
6972 if err := p.ReadField1(ctx, iprot); err != nil {
6973 return err
6974 }
6975 } else {
6976 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
6977 return err
6978 }
6979 }
6980 case 2:
6981 if fieldTypeId == thrift.LIST {
6982 if err := p.ReadField2(ctx, iprot); err != nil {
6983 return err
6984 }
6985 } else {
6986 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
6987 return err
6988 }
6989 }
6990 default:
6991 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
6992 return err
6993 }
6994 }
6995 if err := iprot.ReadFieldEnd(ctx); err != nil {
6996 return err
6997 }
6998 }
6999 if err := iprot.ReadStructEnd(ctx); err != nil {
7000 return thrift.PrependError(fmt.Sprintf("%T read struct end error: ", p), err)
7001 }
7002 return nil
7003}
7004
7005func (p *TNodeLocations) ReadField1(ctx context.Context, iprot thrift.TProtocol) error {
7006 _, size, err := iprot.ReadListBegin(ctx)

Callers

nothing calls this directly

Calls 2

ReadField1Method · 0.95
ReadField2Method · 0.95

Tested by

no test coverage detected