Beispiel #1
0
func (s *Span) read(r *typed.ReadBuffer) error {
	s.traceID = r.ReadUint64()
	s.parentID = r.ReadUint64()
	s.spanID = r.ReadUint64()
	s.flags = r.ReadByte()
	return r.Err()
}
Beispiel #2
0
func (m *callRes) read(r *typed.ReadBuffer) error {
	m.ResponseCode = ResponseCode(r.ReadByte())
	m.Tracing.read(r)
	m.Headers = callHeaders{}
	m.Headers.read(r)
	return r.Err()
}
Beispiel #3
0
func (ch callHeaders) read(r *typed.ReadBuffer) {
	nh := r.ReadByte()
	for i := 0; i < int(nh); i++ {
		k := r.ReadLen8String()
		v := r.ReadLen8String()
		ch[CallHeaderName(k)] = v
	}
}
Beispiel #4
0
func (fh *FrameHeader) read(r *typed.ReadBuffer) error {
	fh.size = r.ReadUint16()
	fh.messageType = messageType(r.ReadByte())
	fh.reserved1 = r.ReadByte()
	fh.ID = r.ReadUint32()
	r.ReadBytes(len(fh.reserved))
	return r.Err()
}
Beispiel #5
0
func (m *errorMessage) read(r *typed.ReadBuffer) error {
	m.errCode = SystemErrCode(r.ReadByte())
	m.id = r.ReadUint32()
	m.message = r.ReadLen16String()
	return r.Err()
}