1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

feat: retries to fetch more logs if no logs are fetched when scrolling up (#3230)

This commit is contained in:
Amir Raminfar
2024-08-26 06:23:11 -07:00
committed by GitHub
parent 36f3308e1d
commit afcb80938e
6 changed files with 84 additions and 12 deletions

View File

@@ -45,6 +45,12 @@ func (r *RingBuffer[T]) Push(data T) {
}
}
func (r *RingBuffer[T]) Len() int {
r.mutex.RLock()
defer r.mutex.RUnlock()
return len(r.data)
}
func (r *RingBuffer[T]) Clear() {
r.mutex.Lock()
defer r.mutex.Unlock()