mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-24 06:28:42 +01:00
feat: deactivates collection of stats after 6 hours of idle (#2830)
This commit is contained in:
@@ -31,6 +31,13 @@ func (r *RingBuffer[T]) Push(data T) {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *RingBuffer[T]) Clear() {
|
||||
r.mutex.Lock()
|
||||
defer r.mutex.Unlock()
|
||||
r.data = r.data[:0]
|
||||
r.start = 0
|
||||
}
|
||||
|
||||
func (r *RingBuffer[T]) Data() []T {
|
||||
r.mutex.RLock()
|
||||
defer r.mutex.RUnlock()
|
||||
|
||||
Reference in New Issue
Block a user