summaryrefslogtreecommitdiff
path: root/vendor/github.com/testcontainers/testcontainers-go/logconsumer.go
blob: 95bf111983367854d424c5d672510ce41508297b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package testcontainers

// StdoutLog is the log type for STDOUT
const StdoutLog = "STDOUT"

// StderrLog is the log type for STDERR
const StderrLog = "STDERR"

// logStruct {

// 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
}

// }

// logConsumerInterface {

// 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)
}

// }

// LogConsumerConfig is a configuration object for the producer/consumer pattern
type LogConsumerConfig struct {
	Opts      []LogProductionOption // options for the production of logs
	Consumers []LogConsumer         // consumers for the logs
}