func (m *callReq) write(w *typed.WriteBuffer) error { w.WriteUint32(uint32(m.TimeToLive.Seconds() * 1000)) m.Tracing.write(w) w.WriteLen8String(m.Service) m.Headers.write(w) return w.Err() }
func writeHeaders(w *typed.WriteBuffer, headers map[string]string) { w.WriteSingleByte(byte(len(headers))) // number of headers for k, v := range headers { w.WriteLen8String(k) w.WriteLen8String(v) } }
func (ch transportHeaders) write(w *typed.WriteBuffer) { w.WriteSingleByte(byte(len(ch))) for k, v := range ch { w.WriteLen8String(k.String()) w.WriteLen8String(v) } }