class documentation
A ring buffer for requests.
This is used to store the last N requests in memory. It is used to retrieve the last requests for debugging purposes.
| Method | __init__ |
Initialize a ring buffer with a fixed size. |
Inherited from RingBuffer:
| Method | __getitem__ |
Get an item from the buffer by index. |
| Method | append |
Add an item to the ring buffer. If the buffer is full, the oldest item is removed. |
| Method | increment |
Increment the head in a circular manner. |
| Method | next |
Increment an index in a circular manner without modifying the current index. |
| Instance Variable | buffer |
The internal storage for the ring buffer, initialized with None values. |
| Instance Variable | capacity |
The maximum number of items the buffer can hold. |
| Instance Variable | head |
The current head index of the ring buffer, initialized to -1 indicating an empty buffer. |