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

Method ReadField2

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

Source from the content-addressed store, hash-verified

1568}
1569
1570func (p *TRegionReplicaSet) ReadField2(ctx context.Context, iprot thrift.TProtocol) error {
1571 _, size, err := iprot.ReadListBegin(ctx)
1572 if err != nil {
1573 return thrift.PrependError("error reading list begin: ", err)
1574 }
1575 tSlice := make([]*TDataNodeLocation, 0, size)
1576 p.DataNodeLocations = tSlice
1577 for i := 0; i < size; i ++ {
1578 _elem2 := &TDataNodeLocation{}
1579 if err := _elem2.Read(ctx, iprot); err != nil {
1580 return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem2), err)
1581 }
1582 p.DataNodeLocations = append(p.DataNodeLocations, _elem2)
1583 }
1584 if err := iprot.ReadListEnd(ctx); err != nil {
1585 return thrift.PrependError("error reading list end: ", err)
1586 }
1587 return nil
1588}
1589
1590func (p *TRegionReplicaSet) Write(ctx context.Context, oprot thrift.TProtocol) error {
1591 if err := oprot.WriteStructBegin(ctx, "TRegionReplicaSet"); err != nil {

Callers 1

ReadMethod · 0.95

Calls 1

ReadMethod · 0.95

Tested by

no test coverage detected