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

Function newWriteBatch

writer.go:1212–1219  ·  view source on GitHub ↗
(now time.Time, timeout time.Duration)

Source from the content-addressed store, hash-verified

1210}
1211
1212func newWriteBatch(now time.Time, timeout time.Duration) *writeBatch {
1213 return &writeBatch{
1214 time: now,
1215 ready: make(chan struct{}),
1216 done: make(chan struct{}),
1217 timer: time.NewTimer(timeout),
1218 }
1219}
1220
1221func (b *writeBatch) add(msg Message, maxSize int, maxBytes int64) bool {
1222 bytes := int64(msg.totalSize())

Calls

no outgoing calls