Object.StreamProcessor (object v0.1.2)
Stream processor with backpressure control for ideation and data flow.
This module implements the concepts formally verified in our LEAN4 proofs, providing a concrete implementation of stream processing with backpressure that prevents buffer overflow and maintains quality of service.
Summary
Functions
Get current backpressure level (0.0 to 1.0).
Returns a specification to start this module under a supervisor.
Try to emit an element to the processor. Returns {:ok, :accepted} or {:error, :backpressure}.
Get current processor state and statistics.
Process one element from the buffer. Returns {:ok, element} or {:error, :empty}.
Starts a stream processor with given capacity.
Types
@type t() :: %Object.StreamProcessor{ buffer: [element()], capacity: pos_integer(), pressure: float(), processed: non_neg_integer(), stats: map() }
Functions
Get current backpressure level (0.0 to 1.0).
Returns a specification to start this module under a supervisor.
See Supervisor
.
Try to emit an element to the processor. Returns {:ok, :accepted} or {:error, :backpressure}.
Get current processor state and statistics.
Process one element from the buffer. Returns {:ok, element} or {:error, :empty}.
Starts a stream processor with given capacity.