// Remains shows key-value pairs not timed out
Remains shows key-value pairs not timed out
// Remains shows key - value pairs not timed out
func (q *TimeoutQueue) Remains() []TimeoutData {
	q.mu.RLock()
	defer q.mu.RUnlock()
	if len(q.data) == 0 {
		return nil
	}
	result := make([]TimeoutData, len(q.data))
	for i, d := range q.data {
		result[i] = *d
	}
	return result
}
func ( q * TimeoutQueue ) Remains ( ) [ ] TimeoutData { q . mu . RLock ( ) defer q . mu . RUnlock ( ) if len ( q . data ) == 0 { return nil } result := make ( [ ] TimeoutData , len ( q . data ) ) for i , d := range q . data { result [ i ] = * d } return result }
Remains shows key-value pairs not timed out
Remains shows key - value pairs not timed out