mirror of
https://github.com/slackhq/nebula.git
synced 2026-05-16 12:57:38 +02:00
size arena to match batch size
This commit is contained in:
@@ -20,10 +20,10 @@ const passthroughBaseNumSlots = 128
|
||||
// standalone Passthrough batcher: 128 slots × udp.MTU ≈ 1.1 MiB.
|
||||
const DefaultPassthroughArenaCap = passthroughBaseNumSlots * udp.MTU
|
||||
|
||||
func NewPassthrough(w io.Writer, arena *Arena) *Passthrough {
|
||||
func NewPassthrough(w io.Writer, slots int, arena *Arena) *Passthrough {
|
||||
return &Passthrough{
|
||||
out: w,
|
||||
slots: make([][]byte, 0, passthroughBaseNumSlots),
|
||||
slots: make([][]byte, 0, slots),
|
||||
arena: arena,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user