(msg *Message, timestampDelta time.Duration, offsetDelta int64)
| 96 | } |
| 97 | |
| 98 | func recordSize(msg *Message, timestampDelta time.Duration, offsetDelta int64) int { |
| 99 | return 1 + // attributes |
| 100 | varIntLen(int64(milliseconds(timestampDelta))) + |
| 101 | varIntLen(offsetDelta) + |
| 102 | varBytesLen(msg.Key) + |
| 103 | varBytesLen(msg.Value) + |
| 104 | varArrayLen(len(msg.Headers), func(i int) int { |
| 105 | h := &msg.Headers[i] |
| 106 | return varStringLen(h.Key) + varBytesLen(h.Value) |
| 107 | }) |
| 108 | } |
no test coverage detected