Skip to main content

Module control

Module control 

Source
Expand description

Control operators — side-effect, gating, error recovery, convergence.

§Operators

  • tap / tap_observer — side-effect passthrough.
  • on_first_data — one-shot side-effect on first DATA.
  • rescue — error recovery via user callback.
  • valve — boolean-gated passthrough with optional cancellation.
  • settle — wave-count convergence detector.
  • repeat — sequential resubscribe loop.

Functions§

on_first_data
One-shot side-effect tap. Calls invoke_tap_fn(fn_id, handle) on the first DATA only, then becomes a pure passthrough. All messages are forwarded unchanged.
repeat
Sequential resubscribe loop. Forwards all DATA from source. On source COMPLETE, if remaining > 0, resubscribes to source and decrements remaining. On ERROR, terminates immediately (no retry).
rescue
Error recovery operator. On ERROR, calls binding.invoke_rescue_fn(fn_id, error_handle):
settle
Wave-count convergence detector.
tap
Passthrough operator that forwards all DATA unchanged. On each DATA, calls binding.invoke_tap_fn(fn_id, handle) as a side-effect. Forwards COMPLETE and ERROR unchanged.
tap_observer
Like tap but with lifecycle observer callbacks. Each callback is optional (None = skip that lifecycle event).
valve
Boolean-gated passthrough. Subscribes to both source and control.