sse
sse copied to clipboard
Introduce EventLog BufferSize
Hey there,
Thanks for this nice framework.
I would like to request the addition of a mechanism to limit the size of the EventLog to tail the latest ones in memory.
This can be done by patching the EventLog as follows:
if len(stream.Eventlog) >= Limitsize {
L := len(stream.Eventlog)
stream.Eventlog =stream.Eventlog[L-Limitsize : L-1]
}
Hi! Same problem, current implementation of EventLog is memory leaking) I think some kind of circular/ring buffer be better, than copy and extend slice every time.