本文整理汇总了Golang中github.com/apache/thrift/lib/go/thrift.TProtocol.WriteI64方法的典型用法代码示例。如果您正苦于以下问题:Golang TProtocol.WriteI64方法的具体用法?Golang TProtocol.WriteI64怎么用?Golang TProtocol.WriteI64使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/apache/thrift/lib/go/thrift.TProtocol
的用法示例。
在下文中一共展示了TProtocol.WriteI64方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: writeField2
func (p *AddServiceSumArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("b", thrift.I64, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:b: ", p), err)
}
if err := oprot.WriteI64(int64(p.B)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.b (2) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 2:b: ", p), err)
}
return err
}
示例2: writeField3
func (p *Chunk) writeField3(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("offset", thrift.I64, 3); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:offset: ", p), err)
}
if err := oprot.WriteI64(int64(p.Offset)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.offset (3) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 3:offset: ", p), err)
}
return err
}
示例3: writeField2
func (p *AddArgs) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("b", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:b: %s", p, err)
}
if err := oprot.WriteI64(int64(p.B)); err != nil {
return fmt.Errorf("%T.b (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:b: %s", p, err)
}
return err
}
示例4: writeField2
func (p *Dependencies) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("end_time", thrift.I64, 2); err != nil {
return fmt.Errorf("%T write field begin error 2:end_time: %s", p, err)
}
if err := oprot.WriteI64(int64(p.EndTime)); err != nil {
return fmt.Errorf("%T.end_time (2) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 2:end_time: %s", p, err)
}
return err
}
示例5: writeField1
func (p *Moments) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("m0", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:m0: %s", p, err)
}
if err := oprot.WriteI64(int64(p.M0)); err != nil {
return fmt.Errorf("%T.m0 (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:m0: %s", p, err)
}
return err
}
示例6: writeField1
func (p *Span) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("trace_id", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:trace_id: ", p), err)
}
if err := oprot.WriteI64(int64(p.TraceID)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.trace_id (1) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:trace_id: ", p), err)
}
return err
}
示例7: writeField4
func (p *Span) writeField4(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("id", thrift.I64, 4); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:id: ", p), err)
}
if err := oprot.WriteI64(int64(p.ID)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.id (4) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 4:id: ", p), err)
}
return err
}
示例8: writeField1
func (p *AddArgs) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("a", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:a: %s", p, err)
}
if err := oprot.WriteI64(int64(p.A)); err != nil {
return fmt.Errorf("%T.a (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:a: %s", p, err)
}
return err
}
示例9: writeField2
func (p *DataInfo) writeField2(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("size", thrift.I64, 2); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:size: ", p), err)
}
if err := oprot.WriteI64(int64(p.Size)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.size (2) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 2:size: ", p), err)
}
return err
}
示例10: writeField1
func (p *SumReply) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("value", thrift.I64, 1); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:value: ", p), err)
}
if err := oprot.WriteI64(int64(p.Value)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.value (1) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 1:value: ", p), err)
}
return err
}
示例11: writeField4
func (p *Span) writeField4(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("id", thrift.I64, 4); err != nil {
return fmt.Errorf("%T write field begin error 4:id: %s", p, err)
}
if err := oprot.WriteI64(int64(p.Id)); err != nil {
return fmt.Errorf("%T.id (4) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 4:id: %s", p, err)
}
return err
}
示例12: writeField1
func (p *Span) writeField1(oprot thrift.TProtocol) (err error) {
if err := oprot.WriteFieldBegin("trace_id", thrift.I64, 1); err != nil {
return fmt.Errorf("%T write field begin error 1:trace_id: %s", p, err)
}
if err := oprot.WriteI64(int64(p.TraceId)); err != nil {
return fmt.Errorf("%T.trace_id (1) field write error: %s", p, err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return fmt.Errorf("%T write field end error 1:trace_id: %s", p, err)
}
return err
}
示例13: writeField11
func (p *Span) writeField11(oprot thrift.TProtocol) (err error) {
if p.IsSetDuration() {
if err := oprot.WriteFieldBegin("duration", thrift.I64, 11); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 11:duration: ", p), err)
}
if err := oprot.WriteI64(int64(*p.Duration)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.duration (11) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 11:duration: ", p), err)
}
}
return err
}
示例14: writeField10
func (p *Span) writeField10(oprot thrift.TProtocol) (err error) {
if p.IsSetTimestamp() {
if err := oprot.WriteFieldBegin("timestamp", thrift.I64, 10); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 10:timestamp: ", p), err)
}
if err := oprot.WriteI64(int64(*p.Timestamp)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.timestamp (10) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 10:timestamp: ", p), err)
}
}
return err
}
示例15: writeField5
func (p *Span) writeField5(oprot thrift.TProtocol) (err error) {
if p.IsSetParentID() {
if err := oprot.WriteFieldBegin("parent_id", thrift.I64, 5); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:parent_id: ", p), err)
}
if err := oprot.WriteI64(int64(*p.ParentID)); err != nil {
return thrift.PrependError(fmt.Sprintf("%T.parent_id (5) field write error: ", p), err)
}
if err := oprot.WriteFieldEnd(); err != nil {
return thrift.PrependError(fmt.Sprintf("%T write field end error 5:parent_id: ", p), err)
}
}
return err
}