Stream collector (extension seam for live brokers)
Source:R/har_online_sources.R
har_stream_collector.RdAbstract pull collector that yields one observation at a time. This is the
extension point for live streams: provide a collector whose get_next()
returns a single observation (scalar, one-row data.frame, or a list with at
least a value field) or NULL when the stream is exhausted, and an optional
close(). Harbinger ships no broker dependency; a real Kafka collector is
user-supplied code backed by the user's own client (e.g. via reticulate).
Examples
collector <- har_stream_collector()
try(collector$get_next())
#> Error : get_next() must be implemented by the collector.