Offline transports for testing, local development, and disabled emission.
Every emit(event) method accepts a RunEvent model and returns that event
invisibly after success.
Details
AccumulatingTransport stores emitted models in its public events list.
Its clear() method removes all accumulated events and returns the transport
invisibly.
ConsoleTransport writes one indented JSON event to stream. Set
pretty = FALSE for single-line output.
NoopTransport validates an event but performs no output or storage.
All transports provide close(), which returns TRUE invisibly because the
local transports have no pending work.
Methods
Inherited methods
OpenLineageTransport$close()
AccumulatingTransport$new()
Create an empty accumulating transport.
Usage
AccumulatingTransport$new()Methods
Inherited methods
OpenLineageTransport$close()
ConsoleTransport$new()
Create a console transport.
Usage
ConsoleTransport$new(stream = stdout(), pretty = TRUE)Methods
Inherited methods
OpenLineageTransport$close()
Examples
transport <- AccumulatingTransport$new()
event <- RunEvent(
Run(new_run_id()),
Job("example", "task"),
event_type = "START"
)
transport$emit(event)
length(transport$events)
#> [1] 1
console <- ConsoleTransport$new(pretty = FALSE)
noop <- NoopTransport$new()
noop$emit(event)