Пример #1
0
func (t *OffsetFetchRequestV1) Marshal(w *wipro.Writer) {
	w.WriteString(t.ConsumerGroup)
	w.WriteInt32(int32(len(t.PartitionInTopics)))
	for i := range t.PartitionInTopics {
		t.PartitionInTopics[i].Marshal(w)
	}
}
Пример #2
0
func (t *RequestOrResponse) Marshal(w *wipro.Writer) {
	offset := len(w.B)
	w.WriteInt32(t.Size)
	start := len(w.B)
	t.M.Marshal(w)
	w.SetInt32(offset, int32(len(w.B)-start))
}
Пример #3
0
func (t *SizedMessage) Marshal(w *wipro.Writer) {
	offset := len(w.B)
	w.WriteInt32(t.Size)
	start := len(w.B)
	t.CRCMessage.Marshal(w)
	w.SetInt32(offset, int32(len(w.B)-start))
}
Пример #4
0
func (t *JoinGroupRequest) Marshal(w *wipro.Writer) {
	w.WriteString(t.GroupID)
	w.WriteInt32(t.SessionTimeout)
	w.WriteString(t.MemberID)
	w.WriteString(t.ProtocolType)
	t.GroupProtocols.Marshal(w)
}
Пример #5
0
func (t *OffsetRequest) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.ReplicaID)
	w.WriteInt32(int32(len(t.TimeInTopics)))
	for i := range t.TimeInTopics {
		t.TimeInTopics[i].Marshal(w)
	}
}
Пример #6
0
func (t *OffsetCommitInTopicV2) Marshal(w *wipro.Writer) {
	w.WriteString(t.TopicName)
	w.WriteInt32(int32(len(t.OffsetCommitInPartitionV2s)))
	for i := range t.OffsetCommitInPartitionV2s {
		t.OffsetCommitInPartitionV2s[i].Marshal(w)
	}
}
Пример #7
0
func (t *OffsetCommitRequestV0) Marshal(w *wipro.Writer) {
	w.WriteString(t.ConsumerGroupID)
	w.WriteInt32(int32(len(t.OffsetCommitInTopicV0s)))
	for i := range t.OffsetCommitInTopicV0s {
		t.OffsetCommitInTopicV0s[i].Marshal(w)
	}
}
Пример #8
0
func (t *OffsetMetadataInTopic) Marshal(w *wipro.Writer) {
	w.WriteString(t.TopicName)
	w.WriteInt32(int32(len(t.OffsetMetadataInPartitions)))
	for i := range t.OffsetMetadataInPartitions {
		t.OffsetMetadataInPartitions[i].Marshal(w)
	}
}
Пример #9
0
func (t *FetchMessageSetInTopic) Marshal(w *wipro.Writer) {
	w.WriteString(t.TopicName)
	w.WriteInt32(int32(len(t.FetchMessageSetInPartitions)))
	for i := range t.FetchMessageSetInPartitions {
		t.FetchMessageSetInPartitions[i].Marshal(w)
	}
}
Пример #10
0
func (t *PartitionAssignment) Marshal(w *wipro.Writer) {
	w.WriteString(t.Topic)
	w.WriteInt32(int32(len(t.Partitions)))
	for i := range t.Partitions {
		w.WriteInt32(t.Partitions[i])
	}
}
Пример #11
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)
}
Пример #12
0
func (t *OffsetsInPartition) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.Partition)
	t.ErrorCode.Marshal(w)
	w.WriteInt32(int32(len(t.Offsets)))
	for i := range t.Offsets {
		w.WriteInt64(t.Offsets[i])
	}
}
Пример #13
0
func (t *TopicMetadata) Marshal(w *wipro.Writer) {
	t.ErrorCode.Marshal(w)
	w.WriteString(t.TopicName)
	w.WriteInt32(int32(len(t.PartitionMetadatas)))
	for i := range t.PartitionMetadatas {
		t.PartitionMetadatas[i].Marshal(w)
	}
}
Пример #14
0
func (t *JoinGroupResponse) Marshal(w *wipro.Writer) {
	t.ErrorCode.Marshal(w)
	w.WriteInt32(t.GenerationID)
	w.WriteString(t.GroupProtocolName)
	w.WriteString(t.LeaderID)
	w.WriteString(t.MemberID)
	t.MemberWithMetas.Marshal(w)
}
Пример #15
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)
	}
}
Пример #16
0
func (t *MessageSet) Marshal(w *wipro.Writer) {
	offset := len(w.B)
	w.WriteInt32(0)
	start := len(w.B)
	for i := range *t {
		(*t)[i].Marshal(w)
	}
	w.SetInt32(offset, int32(len(w.B)-start))
}
Пример #17
0
func (t *OffsetCommitRequestV2) Marshal(w *wipro.Writer) {
	w.WriteString(t.ConsumerGroup)
	w.WriteInt32(t.ConsumerGroupGenerationID)
	w.WriteString(t.ConsumerID)
	w.WriteInt64(t.RetentionTime)
	w.WriteInt32(int32(len(t.OffsetCommitInTopicV2s)))
	for i := range t.OffsetCommitInTopicV2s {
		t.OffsetCommitInTopicV2s[i].Marshal(w)
	}
}
Пример #18
0
func (t *TopicMetadataResponse) Marshal(w *wipro.Writer) {
	w.WriteInt32(int32(len(t.Brokers)))
	for i := range t.Brokers {
		t.Brokers[i].Marshal(w)
	}
	w.WriteInt32(int32(len(t.TopicMetadatas)))
	for i := range t.TopicMetadatas {
		t.TopicMetadatas[i].Marshal(w)
	}
}
Пример #19
0
func (t *FetchRequest) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.ReplicaID)
	w.WriteInt32(t.MaxWaitTime)
	w.WriteInt32(t.MinBytes)
	w.WriteInt32(int32(len(t.FetchOffsetInTopics)))
	for i := range t.FetchOffsetInTopics {
		t.FetchOffsetInTopics[i].Marshal(w)
	}
}
Пример #20
0
func (t *HeartbeatRequest) Marshal(w *wipro.Writer) {
	w.WriteString(t.GroupID)
	w.WriteInt32(t.GenerationID)
	w.WriteString(t.MemberID)
}
Пример #21
0
func (t *PartitionAssignments) Marshal(w *wipro.Writer) {
	w.WriteInt32(int32(len((*t))))
	for i := range *t {
		(*t)[i].Marshal(w)
	}
}
Пример #22
0
func (t *MemberWithMetas) Marshal(w *wipro.Writer) {
	w.WriteInt32(int32(len((*t))))
	for i := range *t {
		(*t)[i].Marshal(w)
	}
}
Пример #23
0
func (t *SyncGroupRequest) Marshal(w *wipro.Writer) {
	w.WriteString(t.GroupID)
	w.WriteInt32(t.GenerationID)
	w.WriteString(t.MemberID)
	t.GroupAssignments.Marshal(w)
}
Пример #24
0
func (t *OffsetCommitInPartitionV2) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.Partition)
	w.WriteInt64(t.Offset)
	w.WriteString(t.Metadata)
}
Пример #25
0
func (t *TimeInPartition) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.Partition)
	w.WriteInt64(t.Time)
	w.WriteInt32(t.MaxNumberOfOffsets)
}
Пример #26
0
func (t *Subscription) Marshal(w *wipro.Writer) {
	w.WriteInt32(int32(len((*t))))
	for i := range *t {
		w.WriteString((*t)[i])
	}
}
Пример #27
0
func (t *GroupProtocols) Marshal(w *wipro.Writer) {
	w.WriteInt32(int32(len((*t))))
	for i := range *t {
		(*t)[i].Marshal(w)
	}
}
Пример #28
0
func (t *ErrorInPartition) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.Partition)
	t.ErrorCode.Marshal(w)
}
Пример #29
0
func (t *OffsetMetadataInPartition) Marshal(w *wipro.Writer) {
	w.WriteInt32(t.Partition)
	w.WriteInt64(t.Offset)
	w.WriteString(t.Metadata)
	t.ErrorCode.Marshal(w)
}
Пример #30
0
func (t *OffsetFetchResponse) Marshal(w *wipro.Writer) {
	w.WriteInt32(int32(len((*t))))
	for i := range *t {
		(*t)[i].Marshal(w)
	}
}