当前位置: 首页>>代码示例>>Golang>>正文


Golang TProtocol.ReadListBegin方法代码示例

本文整理汇总了Golang中git/apache/org/thrift/git/lib/go/thrift.TProtocol.ReadListBegin方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.ReadListBegin方法的具体用法?Golang TProtocol.ReadListBegin怎么用?Golang TProtocol.ReadListBegin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在git/apache/org/thrift/git/lib/go/thrift.TProtocol的用法示例。


在下文中一共展示了TProtocol.ReadListBegin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: readField2

func (p *News) readField2(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list being: %s")
	}
	p.Articles = make([]*Article, 0, size)
	for i := 0; i < size; i++ {
		_elem0 := NewArticle()
		if err := _elem0.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem0)
		}
		p.Articles = append(p.Articles, _elem0)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s")
	}
	return nil
}
开发者ID:tuhao,项目名称:Thrift4AsyncMsg,代码行数:18,代码来源:ttypes.go

示例2: readField5

func (p *QueryResult) readField5(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list being: %s")
	}
	p.VmMoneyList = make([]*VmMoney, 0, size)
	for i := 0; i < size; i++ {
		_elem0 := NewVmMoney()
		if err := _elem0.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem0)
		}
		p.VmMoneyList = append(p.VmMoneyList, _elem0)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s")
	}
	return nil
}
开发者ID:NotBadPad,项目名称:hbase-thrift-go,代码行数:18,代码来源:ttypes.go

示例3: readField1

func (p *PushNewsArgs) readField1(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list being: %s")
	}
	p.Data = make([]*News, 0, size)
	for i := 0; i < size; i++ {
		_elem12 := NewNews()
		if err := _elem12.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem12)
		}
		p.Data = append(p.Data, _elem12)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s")
	}
	return nil
}
开发者ID:tuhao,项目名称:Thrift4AsyncMsg,代码行数:18,代码来源:data_service.go

示例4: readField0

func (p *PullResult) readField0(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list being: %s")
	}
	p.Success = make([]*Data, 0, size)
	for i := 0; i < size; i++ {
		_elem6 := NewData()
		if err := _elem6.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem6)
		}
		p.Success = append(p.Success, _elem6)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s")
	}
	return nil
}
开发者ID:tuhao,项目名称:Thrift4AsyncMsg,代码行数:18,代码来源:data_service.go

示例5: readField1

func (p *AppendBatchArgs) readField1(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list being: %s")
	}
	p.Events = make([]*ThriftFlumeEvent, 0, size)
	for i := 0; i < size; i++ {
		_elem12 := NewThriftFlumeEvent()
		if err := _elem12.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem12)
		}
		p.Events = append(p.Events, _elem12)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s")
	}
	return nil
}
开发者ID:rejoicelee,项目名称:flume-log-sdk,代码行数:18,代码来源:thrift_source_protocol.go

示例6: ReadField0

func (p *FetchResult) ReadField0(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]*User, 0, size)
	p.Success = tSlice
	for i := 0; i < size; i++ {
		_elem14 := &User{}
		if err := _elem14.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem14, err)
		}
		p.Success = append(p.Success, _elem14)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
开发者ID:mdennebaum,项目名称:pelican,代码行数:19,代码来源:usersvc.go

示例7: ReadField1

func (p *GetChatMessagesArgs) ReadField1(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]*entity.ChatMessage, 0, size)
	p.Messages = tSlice
	for i := 0; i < size; i++ {
		_elem10 := &entity.ChatMessage{}
		if err := _elem10.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem10, err)
		}
		p.Messages = append(p.Messages, _elem10)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
开发者ID:lei-yu,项目名称:GOPATH,代码行数:19,代码来源:chatmanagersync.go

示例8: readField1

func (p *LogArgs) readField1(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s")
	}
	tSlice := make([]*LogEntry, 0, size)
	p.Messages = tSlice
	for i := 0; i < size; i++ {
		_elem5 := NewLogEntry()
		if err := _elem5.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem5, err)
		}
		p.Messages = append(p.Messages, _elem5)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s")
	}
	return nil
}
开发者ID:wanyisunflower,项目名称:scribe-go,代码行数:19,代码来源:scribe.go

示例9: ReadField1

func (p *AppendBatchArgs) ReadField1(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]*ThriftFlumeEvent, 0, size)
	p.Events = tSlice
	for i := 0; i < size; i++ {
		_elem8 := &ThriftFlumeEvent{}
		if err := _elem8.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem8, err)
		}
		p.Events = append(p.Events, _elem8)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
开发者ID:ceocoder,项目名称:glumelogger,代码行数:19,代码来源:thriftsourceprotocol.go

示例10: ReadField1

func (p *BoltProcessRecordsArgs) ReadField1(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]*Record, 0, size)
	p.Records = tSlice
	for i := 0; i < size; i++ {
		_elem43 := &Record{}
		if err := _elem43.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem43, err)
		}
		p.Records = append(p.Records, _elem43)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
开发者ID:concord,项目名称:concord-go,代码行数:19,代码来源:computationservice.go

示例11: readField4

func (p *Entry) readField4(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.PrependError("error reading list begin: ", err)
	}
	tSlice := make([]*EntryMessage, 0, size)
	p.Context = tSlice
	for i := 0; i < size; i++ {
		_elem0 := &EntryMessage{}
		if err := _elem0.Read(iprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem0), err)
		}
		p.Context = append(p.Context, _elem0)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return thrift.PrependError("error reading list end: ", err)
	}
	return nil
}
开发者ID:peter-edge,项目名称:lion-go,代码行数:19,代码来源:ttypes.go

示例12: readField8

func (p *Span) readField8(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.PrependError("error reading list begin: ", err)
	}
	tSlice := make([]*BinaryAnnotation, 0, size)
	p.BinaryAnnotations = tSlice
	for i := 0; i < size; i++ {
		_elem1 := &BinaryAnnotation{}
		if err := _elem1.Read(iprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem1), err)
		}
		p.BinaryAnnotations = append(p.BinaryAnnotations, _elem1)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return thrift.PrependError("error reading list end: ", err)
	}
	return nil
}
开发者ID:elodina,项目名称:go-zipkin,代码行数:19,代码来源:ttypes.go

示例13: ReadField4

func (p *FichaProcedimentoMasterThrift) ReadField4(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]*FichaProcedimentoChildThrift, 0, size)
	p.AtendProcedimentos = tSlice
	for i := 0; i < size; i++ {
		_elem2 := &FichaProcedimentoChildThrift{}
		if err := _elem2.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem2, err)
		}
		p.AtendProcedimentos = append(p.AtendProcedimentos, _elem2)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
开发者ID:esusab,项目名称:integracao,代码行数:19,代码来源:ttypes.go

示例14: ReadField3

func (p *CitySvcCreateCityArgs) ReadField3(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return thrift.PrependError("error reading list begin: ", err)
	}
	tSlice := make([]*Coordinate, 0, size)
	p.Coords = tSlice
	for i := 0; i < size; i++ {
		_elem186 := &Coordinate{}
		if err := _elem186.Read(iprot); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T error reading struct: ", _elem186), err)
		}
		p.Coords = append(p.Coords, _elem186)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return thrift.PrependError("error reading list end: ", err)
	}
	return nil
}
开发者ID:sebsofen,项目名称:sportapp-server,代码行数:19,代码来源:citysvc.go

示例15: ReadField6

func (p *Span) ReadField6(iprot thrift.TProtocol) error {
	_, size, err := iprot.ReadListBegin()
	if err != nil {
		return fmt.Errorf("error reading list begin: %s", err)
	}
	tSlice := make([]*Annotation, 0, size)
	p.Annotations = tSlice
	for i := 0; i < size; i++ {
		_elem0 := &Annotation{}
		if err := _elem0.Read(iprot); err != nil {
			return fmt.Errorf("%T error reading struct: %s", _elem0, err)
		}
		p.Annotations = append(p.Annotations, _elem0)
	}
	if err := iprot.ReadListEnd(); err != nil {
		return fmt.Errorf("error reading list end: %s", err)
	}
	return nil
}
开发者ID:no2key,项目名称:monitor-1,代码行数:19,代码来源:ttypes.go


注:本文中的git/apache/org/thrift/git/lib/go/thrift.TProtocol.ReadListBegin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。