1 // Package domain provides the logger domain main function.
2 // This is spawned as an OS process by main. It receives log entries
3 // on a channel and writes them sequentially to stdout.
4 package domain
5 6 import "os"
7 8 // Run is the logger domain entry point. It reads []byte log entries
9 // from ch and writes them to stdout until the channel is closed.
10 func Run(ch <-chan []byte) {
11 for entry := range ch {
12 os.Stdout.Write(entry)
13 }
14 }
15