示例#1
0
func (t *Request) Marshal(w *wipro.Writer) {
	w.WriteInt16(t.APIKey)
	w.WriteInt16(t.APIVersion)
	w.WriteInt32(t.CorrelationID)
	w.WriteString(t.ClientID)
	t.RequestMessage.Marshal(w)
}
示例#2
0
func (t *ProduceRequest) Marshal(w *wipro.Writer) {
	w.WriteInt16(t.RequiredAcks)
	w.WriteInt32(t.Timeout)
	w.WriteInt32(int32(len(t.MessageSetInTopics)))
	for i := range t.MessageSetInTopics {
		t.MessageSetInTopics[i].Marshal(w)
	}
}
示例#3
0
func (t *MemberAssignment) Marshal(w *wipro.Writer) {
	w.WriteInt16(t.Version)
	t.PartitionAssignments.Marshal(w)
}
示例#4
0
func (t *ProtocolMetadata) Marshal(w *wipro.Writer) {
	w.WriteInt16(t.Version)
	t.Subscription.Marshal(w)
	w.WriteBytes(t.UserData)
}
示例#5
0
func (t *ErrorCode) Marshal(w *wipro.Writer) {
	w.WriteInt16(int16((*t)))
}