pub struct ExecSession {
pub exec_id: String,
pub input: Pin<Box<dyn AsyncWrite + Send>>,
pub output: Pin<Box<dyn Stream<Item = Result<LogOutput, Error>> + Send>>,
}Expand description
Exec session handle for a single turn.
input is the stdin pipe into the container process. It is ONLY usable for a
process that completes on a newline: the write half can never be closed, so
stdin never reaches EOF (see ContainerManager::exec). Turn input goes in
a file instead — NOT argv, which would leak a pasted secret via docker top
/ host ps / /proc/<pid>/cmdline; see
ContainerManager::upload_turn_prompt. output is a bollard LogOutput
stream; with
tty: false Docker multiplexes stdout as LogOutput::StdOut frames and
stderr as LogOutput::StdErr frames.
Env vars are passed via CreateExecOptions.env (Docker socket) — they never
appear in process argv, preventing CWE-214 credential exposure via ps/proc.
Fields§
§exec_id: StringDocker exec id — pass to ContainerManager::inspect_exec after the
output stream ends to retrieve the process’s real exit code. The stream
ending is NOT the exit status, so callers that care about success/failure
must inspect the exec (the in-container CLI can exit non-zero while still
closing stdout cleanly).
input: Pin<Box<dyn AsyncWrite + Send>>Stdin pipe to the container process. Unusable for EOF-terminated readers
— see the type-level doc and ContainerManager::exec’s attach_stdin.
output: Pin<Box<dyn Stream<Item = Result<LogOutput, Error>> + Send>>Multiplexed stdout/stderr stream (LogOutput::StdOut / LogOutput::StdErr).
Auto Trait Implementations§
impl !RefUnwindSafe for ExecSession
impl !Sync for ExecSession
impl !UnwindSafe for ExecSession
impl Freeze for ExecSession
impl Send for ExecSession
impl Unpin for ExecSession
impl UnsafeUnpin for ExecSession
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more