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

Method Read

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

Source from the content-addressed store, hash-verified

2085}
2086
2087func (p *TDataNodeLocation) Read(ctx context.Context, iprot thrift.TProtocol) error {
2088 if _, err := iprot.ReadStructBegin(ctx); err != nil {
2089 return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err)
2090 }
2091
2092 var issetDataNodeId bool = false;
2093 var issetClientRpcEndPoint bool = false;
2094 var issetInternalEndPoint bool = false;
2095 var issetMPPDataExchangeEndPoint bool = false;
2096 var issetDataRegionConsensusEndPoint bool = false;
2097 var issetSchemaRegionConsensusEndPoint bool = false;
2098
2099 for {
2100 _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx)
2101 if err != nil {
2102 return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err)
2103 }
2104 if fieldTypeId == thrift.STOP { break; }
2105 switch fieldId {
2106 case 1:
2107 if fieldTypeId == thrift.I32 {
2108 if err := p.ReadField1(ctx, iprot); err != nil {
2109 return err
2110 }
2111 issetDataNodeId = true
2112 } else {
2113 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
2114 return err
2115 }
2116 }
2117 case 2:
2118 if fieldTypeId == thrift.STRUCT {
2119 if err := p.ReadField2(ctx, iprot); err != nil {
2120 return err
2121 }
2122 issetClientRpcEndPoint = true
2123 } else {
2124 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
2125 return err
2126 }
2127 }
2128 case 3:
2129 if fieldTypeId == thrift.STRUCT {
2130 if err := p.ReadField3(ctx, iprot); err != nil {
2131 return err
2132 }
2133 issetInternalEndPoint = true
2134 } else {
2135 if err := iprot.Skip(ctx, fieldTypeId); err != nil {
2136 return err
2137 }
2138 }
2139 case 4:
2140 if fieldTypeId == thrift.STRUCT {
2141 if err := p.ReadField4(ctx, iprot); err != nil {
2142 return err
2143 }
2144 issetMPPDataExchangeEndPoint = true

Callers 2

ReadField2Method · 0.95
ReadField2Method · 0.95

Calls 6

ReadField1Method · 0.95
ReadField2Method · 0.95
ReadField3Method · 0.95
ReadField4Method · 0.95
ReadField5Method · 0.95
ReadField6Method · 0.95

Tested by

no test coverage detected