TotalWritten returns the total number of bytes written to the buffer, which may exceed the stored capacity.
()
| 195 | // TotalWritten returns the total number of bytes written to |
| 196 | // the buffer, which may exceed the stored capacity. |
| 197 | func (b *HeadTailBuffer) TotalWritten() int { |
| 198 | b.mu.Lock() |
| 199 | defer b.mu.Unlock() |
| 200 | return b.totalBytes |
| 201 | } |
| 202 | |
| 203 | // Output returns the truncated output suitable for LLM |
| 204 | // consumption, along with truncation metadata. If the total |