Expand description
Source abstraction: a control plane (Source) and a data plane
(SourceLane).
A source is poll-based rather than a futures::Stream. The control plane
surfaces lane assignment and revocation as events and owns commits and
pause/resume; each lane is a pollable unit pinned to one pipeline thread
(for Kafka: a partition queue), yielding payloads that borrow the
source’s buffers for the duration of one push_batch call (ADR-0003).
The obligations an implementor takes on are spelled out in
the connector contracts.
Structs§
- Drain
Barrier - A countdown barrier the controller waits on while pipeline threads
drain. Created with the number of arriving parties (the threads that own
the lanes being stopped); each thread calls
DrainBarrier::arriveexactly once after it has stopped the lanes and flushed its in-flight records; the controller’sDrainBarrier::waitreturnstrueonce all parties arrived, orfalsewhen the drain deadline elapsed. On timeout the caller proceeds and unflushed data replays after restart; at-least-once holds either way. - LaneId
- Identifier of one source lane within an assignment (dense, source-assigned; stable until the lane is revoked).
- Source
Ctx - Everything a source receives at
Source::open.
Enums§
- Source
Event - Control-plane event returned by
Source::poll_events.
Traits§
- Payload
Batch - One poll’s worth of borrowed payloads. Payloads are handed out one at a
time, and every payload shares the batch lifetime
'buf. The batch carries exactly oneAckRef, issued by the lane through itsAckIssuer; records derived from these payloads clone it. - Source
- Control plane of a source. Driven by the runtime’s controller from a single thread; lanes run on pipeline threads.
- Source
Lane - Data-plane pollable unit of a source, owned by one pipeline thread.