har_stream_collector: Stream collector (extension seam for live brokers)

View source: R/har_online_sources.R

har_stream_collectorR Documentation

Stream collector (extension seam for live brokers)

Description

Abstract 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).

Usage

har_stream_collector()

Value

A har_stream_collector object whose get_next() must be overridden.

Examples

collector <- har_stream_collector()
try(collector$get_next())

harbinger documentation built on Nov. 29, 2026, 9:06 a.m.