blob: 8879114e7c56c7f92d55f44c4f61058d612c1997 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package eventstream
import "ior/internal/streamrow"
// RingBuffer is a type alias for streamrow.RingBuffer. The concrete
// implementation lives in the lower-level streamrow package so the core
// tracing engine can use it without importing internal/tui/eventstream.
type RingBuffer = streamrow.RingBuffer
// ringBufferCapacity mirrors the capacity constant for use in this package
// (e.g. stream table rendering).
const ringBufferCapacity = streamrow.RingBufferCapacity
// NewRingBuffer allocates an empty RingBuffer with the default capacity.
func NewRingBuffer() *RingBuffer {
return streamrow.NewRingBuffer()
}
// --- compile-time interface satisfaction assertion ---
//
// *RingBuffer (= *streamrow.RingBuffer) must satisfy the Source contract so
// the TUI dashboard and stream views can receive live events without importing
// the lower-level streamrow package directly.
var _ Source = (*RingBuffer)(nil)
|