monitor: refactor how reload works
The build now happens in a loop and the monitor is run after every build. The monitor can return `ErrReload` to signal to the main thread that it should reload the build result. This will be used in the future to move the monitor into a callback rather than as a separate existence. It allows the monitor to not control the build itself which now makes it possible to completely remove the controller. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
@@ -53,7 +53,7 @@ func RootCmd(dockerCli command.Cli, children ...DebuggableCmd) *cobra.Command {
|
||||
return errors.Errorf("failed to configure terminal: %v", err)
|
||||
}
|
||||
|
||||
_, err = monitor.RunMonitor(ctx, "", nil, &controllerapi.InvokeConfig{
|
||||
err = monitor.RunMonitor(ctx, &controllerapi.InvokeConfig{
|
||||
Tty: true,
|
||||
}, c, dockerCli.In(), os.Stdout, os.Stderr, printer)
|
||||
con.Reset()
|
||||
|
||||
Reference in New Issue
Block a user