Run starts the VM and processes lines coming in on the input channel. When the channel is closed, and the VM has finished processing the VM is shut down and the loader signalled via the given waitgroup.
(lines <-chan *logline.LogLine, wg *sync.WaitGroup)
| 1050 | // the channel is closed, and the VM has finished processing the VM is shut |
| 1051 | // down and the loader signalled via the given waitgroup. |
| 1052 | func (v *VM) Run(lines <-chan *logline.LogLine, wg *sync.WaitGroup) { |
| 1053 | defer wg.Done() |
| 1054 | glog.V(1).Infof("started VM %q", v.name) |
| 1055 | ctx := context.TODO() |
| 1056 | for line := range lines { |
| 1057 | v.ProcessLogLine(ctx, line) |
| 1058 | } |
| 1059 | glog.Infof("VM %q finished", v.name) |
| 1060 | } |