mirror of
https://github.com/status-im/consul.git
synced 2025-02-11 05:07:02 +00:00
- remove dep on consul main module - use 'consul tls' subcommands instead of tlsutil - use direct json config construction instead of agent/config structs - merge libcluster and libagent packages together - more widely use BuildContext - get the OSS/ENT runner stuff working properly - reduce some flakiness - fix some correctness related to http/https API
24 lines
426 B
Go
24 lines
426 B
Go
package cluster
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
|
|
"github.com/testcontainers/testcontainers-go"
|
|
)
|
|
|
|
type LogConsumer struct {
|
|
Prefix string
|
|
}
|
|
|
|
var _ testcontainers.LogConsumer = (*LogConsumer)(nil)
|
|
|
|
func (c *LogConsumer) Accept(log testcontainers.Log) {
|
|
switch log.LogType {
|
|
case "STDOUT":
|
|
fmt.Fprint(os.Stdout, c.Prefix+" ~~ "+string(log.Content))
|
|
case "STDERR":
|
|
fmt.Fprint(os.Stderr, c.Prefix+" ~~ "+string(log.Content))
|
|
}
|
|
}
|