moved the kafka-go project to this repository
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package response
|
||||
|
||||
import "encoding/binary"
|
||||
|
||||
type V0Header struct {
|
||||
Correlation_id uint32
|
||||
}
|
||||
|
||||
func NewHeader(correlation_id uint32) *V0Header {
|
||||
return &V0Header{
|
||||
Correlation_id: correlation_id,
|
||||
}
|
||||
}
|
||||
|
||||
func (h *V0Header) ToBytes() []byte {
|
||||
buf := make([]byte, 4)
|
||||
binary.BigEndian.PutUint32(buf, uint32(h.Correlation_id))
|
||||
return buf
|
||||
}
|
||||
Reference in New Issue
Block a user