MCPcopy
hub / github.com/segmentio/kafka-go / message

Method message

message.go:33–44  ·  view source on GitHub ↗
(cw *crc32Writer)

Source from the content-addressed store, hash-verified

31}
32
33func (msg Message) message(cw *crc32Writer) message {
34 m := message{
35 MagicByte: 1,
36 Key: msg.Key,
37 Value: msg.Value,
38 Timestamp: timestamp(msg.Time),
39 }
40 if cw != nil {
41 m.CRC = m.crc32(cw)
42 }
43 return m
44}
45
46const timestampSize = 8
47

Callers 1

TestMessageSizeFunction · 0.95

Calls 2

crc32Method · 0.95
timestampFunction · 0.70

Tested by 1

TestMessageSizeFunction · 0.76