當前位置: 首頁>>代碼示例>>Golang>>正文


Golang TProtocol.WriteStructBegin方法代碼示例

本文整理匯總了Golang中github.com/apache/thrift/lib/go/thrift.TProtocol.WriteStructBegin方法的典型用法代碼示例。如果您正苦於以下問題:Golang TProtocol.WriteStructBegin方法的具體用法?Golang TProtocol.WriteStructBegin怎麽用?Golang TProtocol.WriteStructBegin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在github.com/apache/thrift/lib/go/thrift.TProtocol的用法示例。


在下文中一共展示了TProtocol.WriteStructBegin方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: Write

func (p *BinaryAnnotation) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("BinaryAnnotation"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := p.writeField2(oprot); err != nil {
		return err
	}
	if err := p.writeField3(oprot); err != nil {
		return err
	}
	if err := p.writeField4(oprot); err != nil {
		return err
	}
	if err := p.writeField5(oprot); err != nil {
		return err
	}
	if err := p.writeField6(oprot); err != nil {
		return err
	}
	if err := p.writeField7(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:dansimau,項目名稱:ringpop-go,代碼行數:33,代碼來源:ttypes.go

示例2: Write

func (p *Moments) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("Moments"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := p.writeField2(oprot); err != nil {
		return err
	}
	if err := p.writeField3(oprot); err != nil {
		return err
	}
	if err := p.writeField4(oprot); err != nil {
		return err
	}
	if err := p.writeField5(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:cnicolov,項目名稱:kit,代碼行數:27,代碼來源:ttypes.go

示例3: Write

func (p *FirstAppErrorResult) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("AppError_result"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:uber,項目名稱:tchannel-go,代碼行數:12,代碼來源:first.go

示例4: Write

func (p *SecondServiceBlahBlahArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("blahBlah_args"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:yarpc,項目名稱:yarpc-go,代碼行數:12,代碼來源:secondservice.go

示例5: Write

func (p *MetaVersionInfoArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("versionInfo_args"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:gosuper,項目名稱:tchannel-go,代碼行數:12,代碼來源:meta.go

示例6: Write

func (p *TestResult) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("Test_result"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:pengzhai,項目名稱:tchannel,代碼行數:12,代碼來源:second.go

示例7: Write

func (p *NotAuthorized) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("NotAuthorized"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:gosuper,項目名稱:tchannel-go,代碼行數:12,代碼來源:ttypes.go

示例8: Write

func (p *SimpleArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("Simple_args"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:pengzhai,項目名稱:tchannel,代碼行數:12,代碼來源:simpleservice.go

示例9: Write

func (p *NotAuthorized) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("NotAuthorized"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:pengzhai,項目名稱:tchannel,代碼行數:12,代碼來源:ttypes.go

示例10: Write

func (p *MultiSubmitArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("multi_submit_args"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:hustxiaoc,項目名稱:tchannel,代碼行數:15,代碼來源:tcollector.go

示例11: Write

func (p *StoreDependenciesArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("storeDependencies_args"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:cnicolov,項目名稱:kit,代碼行數:15,代碼來源:zipkincollector.go

示例12: Write

func (p *TCollectorMultiSubmitResult) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("multi_submit_result"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := p.writeField0(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:dansimau,項目名稱:ringpop-go,代碼行數:15,代碼來源:tcollector.go

示例13: Write

func (p *ConcatReply) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("ConcatReply"); err != nil {
		return fmt.Errorf("%T write struct begin error: %s", p, err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return fmt.Errorf("write field stop error: %s", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return fmt.Errorf("write struct stop error: %s", err)
	}
	return nil
}
開發者ID:nimmen,項目名稱:kit,代碼行數:15,代碼來源:ttypes.go

示例14: Write

func (p *AccountDoActionArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("doAction_args"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:LC2010,項目名稱:thrift-step-by-step-go,代碼行數:15,代碼來源:account.go

示例15: Write

func (p *TCollectorGetSamplingStrategyArgs) Write(oprot thrift.TProtocol) error {
	if err := oprot.WriteStructBegin("getSamplingStrategy_args"); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write struct begin error: ", p), err)
	}
	if err := p.writeField1(oprot); err != nil {
		return err
	}
	if err := oprot.WriteFieldStop(); err != nil {
		return thrift.PrependError("write field stop error: ", err)
	}
	if err := oprot.WriteStructEnd(); err != nil {
		return thrift.PrependError("write struct stop error: ", err)
	}
	return nil
}
開發者ID:gosuper,項目名稱:tchannel-go,代碼行數:15,代碼來源:tcollector.go


注:本文中的github.com/apache/thrift/lib/go/thrift.TProtocol.WriteStructBegin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。