Documentation
¶
Overview ¶
Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SizedQueue ¶
type SizedQueue[T any] struct { // contains filtered or unexported fields }
SizedQueue the queue uses the standard `List`. The main difference between `List` is that is capped size, and drops the oldest item when pushing more than its allowed capacity.
func (*SizedQueue[T]) Push ¶
func (s *SizedQueue[T]) Push(data T)
Push the new item to the queue. If the size hits the capacity, It will drop the oldest item.
Click to show internal directories.
Click to hide internal directories.