use submodule

This commit is contained in:
fengzhiqiang
2019-01-08 11:21:45 +08:00
parent cfb9dc5d34
commit 4321c4fc5a
444 changed files with 40 additions and 235563 deletions
-46
View File
@@ -1,46 +0,0 @@
package kafka
import "bufio"
type heartbeatRequestV0 struct {
// GroupID holds the unique group identifier
GroupID string
// GenerationID holds the generation of the group.
GenerationID int32
// MemberID assigned by the group coordinator
MemberID string
}
func (t heartbeatRequestV0) size() int32 {
return sizeofString(t.GroupID) +
sizeofInt32(t.GenerationID) +
sizeofString(t.MemberID)
}
func (t heartbeatRequestV0) writeTo(w *bufio.Writer) {
writeString(w, t.GroupID)
writeInt32(w, t.GenerationID)
writeString(w, t.MemberID)
}
type heartbeatResponseV0 struct {
// ErrorCode holds response error code
ErrorCode int16
}
func (t heartbeatResponseV0) size() int32 {
return sizeofInt16(t.ErrorCode)
}
func (t heartbeatResponseV0) writeTo(w *bufio.Writer) {
writeInt16(w, t.ErrorCode)
}
func (t *heartbeatResponseV0) readFrom(r *bufio.Reader, sz int) (remain int, err error) {
if remain, err = readInt16(r, sz, &t.ErrorCode); err != nil {
return
}
return
}