예제 #1
0
func (p *Endpoint) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("ipv4", thrift.I32, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:ipv4: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Ipv4)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.ipv4 (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:ipv4: ", p), err)
	}
	return err
}
예제 #2
0
func (p *BinaryAnnotation) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("annotation_type", thrift.I32, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:annotation_type: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.AnnotationType)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.annotation_type (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:annotation_type: ", p), err)
	}
	return err
}
예제 #3
0
func (p *ServicePeer) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("port", thrift.I32, 2); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 2:port: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Port)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.port (2) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 2:port: ", p), err)
	}
	return err
}
예제 #4
0
파일: ttypes.go 프로젝트: uber/tchannel-go
func (p *Data) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("i3", thrift.I32, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:i3: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.I3)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.i3 (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:i3: ", p), err)
	}
	return err
}
예제 #5
0
파일: ttypes.go 프로젝트: akaspin/bar
func (p *ServerInfo) writeField4(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("maxConn", thrift.I32, 4); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 4:maxConn: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.MaxConn)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.maxConn (4) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 4:maxConn: ", p), err)
	}
	return err
}
예제 #6
0
파일: ttypes.go 프로젝트: akaspin/bar
func (p *ServerInfo) writeField5(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("bufferSize", thrift.I32, 5); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 5:bufferSize: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.BufferSize)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.bufferSize (5) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 5:bufferSize: ", p), err)
	}
	return err
}
예제 #7
0
func (p *BinaryAnnotation) writeField7(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("annotationType", thrift.I32, 7); err != nil {
		return fmt.Errorf("%T write field begin error 7:annotationType: %s", p, err)
	}
	if err := oprot.WriteI32(int32(p.AnnotationType)); err != nil {
		return fmt.Errorf("%T.annotationType (7) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 7:annotationType: %s", p, err)
	}
	return err
}
예제 #8
0
func (p *Endpoint) writeField2(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("port", thrift.I32, 2); err != nil {
		return fmt.Errorf("%T write field begin error 2:port: %s", p, err)
	}
	if err := oprot.WriteI32(int32(p.Port)); err != nil {
		return fmt.Errorf("%T.port (2) field write error: %s", p, err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return fmt.Errorf("%T write field end error 2:port: %s", p, err)
	}
	return err
}
예제 #9
0
func (p *InvalidOperation) writeField1(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("code", thrift.I32, 1); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:code: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Code)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.code (1) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 1:code: ", p), err)
	}
	return err
}
예제 #10
0
func (p *Request) writeField3(oprot thrift.TProtocol) (err error) {
	if err := oprot.WriteFieldBegin("op", thrift.I32, 3); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:op: ", p), err)
	}
	if err := oprot.WriteI32(int32(p.Op)); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T.op (3) field write error: ", p), err)
	}
	if err := oprot.WriteFieldEnd(); err != nil {
		return thrift.PrependError(fmt.Sprintf("%T write field end error 3:op: ", p), err)
	}
	return err
}
예제 #11
0
func (p *Annotation) writeField3(oprot thrift.TProtocol) (err error) {
	if p.IsSetDuration() {
		if err := oprot.WriteFieldBegin("duration", thrift.I32, 3); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field begin error 3:duration: ", p), err)
		}
		if err := oprot.WriteI32(int32(*p.Duration)); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T.duration (3) field write error: ", p), err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return thrift.PrependError(fmt.Sprintf("%T write field end error 3:duration: ", p), err)
		}
	}
	return err
}
예제 #12
0
파일: ttypes.go 프로젝트: cnicolov/kit
func (p *Annotation) writeField4(oprot thrift.TProtocol) (err error) {
	if p.IsSetDuration() {
		if err := oprot.WriteFieldBegin("duration", thrift.I32, 4); err != nil {
			return fmt.Errorf("%T write field begin error 4:duration: %s", p, err)
		}
		if err := oprot.WriteI32(int32(*p.Duration)); err != nil {
			return fmt.Errorf("%T.duration (4) field write error: %s", p, err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 4:duration: %s", p, err)
		}
	}
	return err
}
예제 #13
0
파일: scribe.go 프로젝트: cnicolov/kit
func (p *LogResult) writeField0(oprot thrift.TProtocol) (err error) {
	if p.IsSetSuccess() {
		if err := oprot.WriteFieldBegin("success", thrift.I32, 0); err != nil {
			return fmt.Errorf("%T write field begin error 0:success: %s", p, err)
		}
		if err := oprot.WriteI32(int32(*p.Success)); err != nil {
			return fmt.Errorf("%T.success (0) field write error: %s", p, err)
		}
		if err := oprot.WriteFieldEnd(); err != nil {
			return fmt.Errorf("%T write field end error 0:success: %s", p, err)
		}
	}
	return err
}