Documentation
¶
Overview ¶
Package ringbuffer 提供线程安全的智能环形缓冲区
Index ¶
- type RingBuffer
- func (rb *RingBuffer[T]) Cap() int
- func (rb *RingBuffer[T]) Clear()
- func (rb *RingBuffer[T]) GetAll() []T
- func (rb *RingBuffer[T]) GetLast(n int) []T
- func (rb *RingBuffer[T]) IsEmpty() bool
- func (rb *RingBuffer[T]) IsFull() bool
- func (rb *RingBuffer[T]) Iterator() <-chan T
- func (rb *RingBuffer[T]) Len() int
- func (rb *RingBuffer[T]) Push(item T)
- func (rb *RingBuffer[T]) PushAll(items []T)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RingBuffer ¶
type RingBuffer[T any] struct { // contains filtered or unexported fields }
RingBuffer 线程安全的环形缓冲区实现
Directories
¶
| Path | Synopsis |
|---|---|
|
Package calculator 定义环形缓冲区索引计算策略
|
Package calculator 定义环形缓冲区索引计算策略 |
|
Package impl 实现环形缓冲区的数组存储版本
|
Package impl 实现环形缓冲区的数组存储版本 |
Click to show internal directories.
Click to hide internal directories.