type evictedQueue … func newEvictedQueueEvent(capacity int) evictedQueue[Event] { … } func newEvictedQueueLink(capacity int) evictedQueue[Link] { … } // add adds value to the evictedQueue eq. If eq is at capacity, the oldest // queued value will be discarded and the drop count incremented. func (eq *evictedQueue[T]) add(value T) { … } // copy returns a copy of the evictedQueue. func (eq *evictedQueue[T]) copy() []T { … }