當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。