Ejemplo n.º 1
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
	}
}
Ejemplo n.º 2
0
func (m *callReq) read(r *typed.ReadBuffer) error {
	m.TimeToLive = time.Duration(r.ReadUint32()) * time.Millisecond
	m.Tracing.read(r)
	m.Service = r.ReadLen8String()
	m.Headers = callHeaders{}
	m.Headers.read(r)
	return r.Err()
}
Ejemplo n.º 3
0
func (ch transportHeaders) read(r *typed.ReadBuffer) {
	nh := r.ReadSingleByte()
	for i := 0; i < int(nh); i++ {
		k := r.ReadLen8String()
		v := r.ReadLen8String()
		ch[TransportHeaderName(k)] = v
	}
}