-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make container and exec logs
Send
able
There is no need to stick logs to lifetime of container: - this way logs can't be sent to another thread/task - logs will stop with EOF if container has been dropped anyway, what's reasonable - it's step forward log followers (like in [Java implementation](https://java.testcontainers.org/features/container_logs/))
- Loading branch information
Showing
8 changed files
with
116 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
use crate::core::logs::LogStreamAsync; | ||
|
||
pub(crate) struct ExecResult<'a> { | ||
pub(crate) struct ExecResult { | ||
pub(crate) id: String, | ||
pub(crate) stdout: LogStreamAsync<'a>, | ||
pub(crate) stderr: LogStreamAsync<'a>, | ||
pub(crate) stdout: LogStreamAsync, | ||
pub(crate) stderr: LogStreamAsync, | ||
} | ||
|
||
impl<'a> ExecResult<'a> { | ||
impl ExecResult { | ||
pub(crate) fn id(&self) -> &str { | ||
&self.id | ||
} | ||
|
||
pub(crate) fn stdout(&mut self) -> &mut LogStreamAsync<'a> { | ||
pub(crate) fn stdout(&mut self) -> &mut LogStreamAsync { | ||
&mut self.stdout | ||
} | ||
|
||
pub(crate) fn stderr(&mut self) -> &mut LogStreamAsync<'a> { | ||
pub(crate) fn stderr(&mut self) -> &mut LogStreamAsync { | ||
&mut self.stderr | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.