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

Method headerSize

message.go:52–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50}
51
52func (msg *Message) headerSize() int {
53 return varArrayLen(len(msg.Headers), func(i int) int {
54 h := &msg.Headers[i]
55 return varStringLen(h.Key) + varBytesLen(h.Value)
56 })
57}
58
59func (msg *Message) totalSize() int32 {
60 return int32(msg.headerSize()) + msg.size()

Callers 1

totalSizeMethod · 0.95

Calls 3

varArrayLenFunction · 0.85
varStringLenFunction · 0.85
varBytesLenFunction · 0.85

Tested by

no test coverage detected