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


Golang TProtocol.WriteI64方法代码示例

本文整理汇总了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
}
开发者ID:cnicolov,项目名称:kit,代码行数:12,代码来源:addservice.go

示例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
}
开发者ID:akaspin,项目名称:bar,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:EthanK28,项目名称:kit,代码行数:12,代码来源:addservice.go

示例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
}
开发者ID:cnicolov,项目名称:kit,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:cnicolov,项目名称:kit,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:ZhuJingfa,项目名称:go-platform,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:ZhuJingfa,项目名称:go-platform,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:EthanK28,项目名称:kit,代码行数:12,代码来源:addservice.go

示例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
}
开发者ID:akaspin,项目名称:bar,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:crezam,项目名称:kit,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:taion809,项目名称:go-zipkin,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:taion809,项目名称:go-zipkin,代码行数:12,代码来源:ttypes.go

示例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
}
开发者ID:ZhuJingfa,项目名称:go-platform,代码行数:14,代码来源:ttypes.go

示例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
}
开发者ID:ZhuJingfa,项目名称:go-platform,代码行数:14,代码来源:ttypes.go

示例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
}
开发者ID:ZhuJingfa,项目名称:go-platform,代码行数:14,代码来源:ttypes.go


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