-
-
Notifications
You must be signed in to change notification settings - Fork 510
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature #133 - Add a FollowOutput method to attach log consumers to
- Loading branch information
1 parent
0a03bcf
commit 6b7fc11
Showing
9 changed files
with
438 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package testcontainers | ||
|
||
// StdoutLog is the log type for STDOUT | ||
const StdoutLog = "STDOUT" | ||
|
||
// StderrLog is the log type for STDERR | ||
const StderrLog = "STDERR" | ||
|
||
// Log represents a message that was created by a process, | ||
// LogType is either "STDOUT" or "STDERR", | ||
// Content is the byte contents of the message itself | ||
type Log struct { | ||
LogType string | ||
Content []byte | ||
} | ||
|
||
// LogConsumer represents any object that can | ||
// handle a Log, it is up to the LogConsumer instance | ||
// what to do with the log | ||
type LogConsumer interface { | ||
Accept(Log) | ||
} |
Oops, something went wrong.