Пример #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)))
}