pub struct TapProcess { /* private fields */ }Expand description
A running tap process and its stdout message channel.
Implementations§
Source§impl TapProcess
impl TapProcess
Sourcepub fn spawn(
cfg: &SingerSourceConfig,
start_state: Option<&Value>,
) -> Result<Self, FaucetError>
pub fn spawn( cfg: &SingerSourceConfig, start_state: Option<&Value>, ) -> Result<Self, FaucetError>
Spawn the tap with --config (and optionally --catalog / --state).
start_state is the resume bookmark loaded from the state store (the
STATE value blob), materialized to a state.json and passed as
--state when present.
Sourcepub async fn recv(&mut self, idle_timeout: Option<Duration>) -> Recv
pub async fn recv(&mut self, idle_timeout: Option<Duration>) -> Recv
Receive the next stdout line, honoring the optional idle timeout.
Sourcepub fn stderr_tail(&self) -> String
pub fn stderr_tail(&self) -> String
The trailing stderr lines (already redacted), newest last.
Sourcepub async fn shutdown_and_check(&mut self) -> Result<(), FaucetError>
pub async fn shutdown_and_check(&mut self) -> Result<(), FaucetError>
Gracefully stop the tap (SIGTERM → grace → SIGKILL) and reap it, then return an error if it exited non-zero. Idempotent-ish: safe to call once on the normal EOF path or the idle-timeout path.
Auto Trait Implementations§
impl !RefUnwindSafe for TapProcess
impl !UnwindSafe for TapProcess
impl Freeze for TapProcess
impl Send for TapProcess
impl Sync for TapProcess
impl Unpin for TapProcess
impl UnsafeUnpin for TapProcess
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more