(ctx context.Context, iprot thrift.TProtocol)
| 1842 | } |
| 1843 | |
| 1844 | func (p *TConfigNodeLocation) Read(ctx context.Context, iprot thrift.TProtocol) error { |
| 1845 | if _, err := iprot.ReadStructBegin(ctx); err != nil { |
| 1846 | return thrift.PrependError(fmt.Sprintf("%T read error: ", p), err) |
| 1847 | } |
| 1848 | |
| 1849 | var issetConfigNodeId bool = false; |
| 1850 | var issetInternalEndPoint bool = false; |
| 1851 | var issetConsensusEndPoint bool = false; |
| 1852 | |
| 1853 | for { |
| 1854 | _, fieldTypeId, fieldId, err := iprot.ReadFieldBegin(ctx) |
| 1855 | if err != nil { |
| 1856 | return thrift.PrependError(fmt.Sprintf("%T field %d read error: ", p, fieldId), err) |
| 1857 | } |
| 1858 | if fieldTypeId == thrift.STOP { break; } |
| 1859 | switch fieldId { |
| 1860 | case 1: |
| 1861 | if fieldTypeId == thrift.I32 { |
| 1862 | if err := p.ReadField1(ctx, iprot); err != nil { |
| 1863 | return err |
| 1864 | } |
| 1865 | issetConfigNodeId = true |
| 1866 | } else { |
| 1867 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 1868 | return err |
| 1869 | } |
| 1870 | } |
| 1871 | case 2: |
| 1872 | if fieldTypeId == thrift.STRUCT { |
| 1873 | if err := p.ReadField2(ctx, iprot); err != nil { |
| 1874 | return err |
| 1875 | } |
| 1876 | issetInternalEndPoint = true |
| 1877 | } else { |
| 1878 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 1879 | return err |
| 1880 | } |
| 1881 | } |
| 1882 | case 3: |
| 1883 | if fieldTypeId == thrift.STRUCT { |
| 1884 | if err := p.ReadField3(ctx, iprot); err != nil { |
| 1885 | return err |
| 1886 | } |
| 1887 | issetConsensusEndPoint = true |
| 1888 | } else { |
| 1889 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 1890 | return err |
| 1891 | } |
| 1892 | } |
| 1893 | default: |
| 1894 | if err := iprot.Skip(ctx, fieldTypeId); err != nil { |
| 1895 | return err |
| 1896 | } |
| 1897 | } |
| 1898 | if err := iprot.ReadFieldEnd(ctx); err != nil { |
| 1899 | return err |
| 1900 | } |
| 1901 | } |
no test coverage detected