monitor: support step-by-step breakpoint debugger
This commit adds a set of commands to monitor for enabling breakpoint debugger. This is implemented based on the walker utility for step-by-step LLB inspection. For each vertex and breakpoint, monitor calls Solve API so the user can enter to the debugger container on each vertex for inspection. User can enter to the breakpoint debugger mode by --invoke=debug-step flag. Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/docker/buildx/controller/control"
|
||||
controllerapi "github.com/docker/buildx/controller/pb"
|
||||
"github.com/docker/buildx/util/walker"
|
||||
)
|
||||
|
||||
// Monitor provides APIs for attaching and controlling the buildx server.
|
||||
@@ -34,6 +35,12 @@ type Monitor interface {
|
||||
|
||||
// AttachedSessionID returns the ID of the attached session.
|
||||
AttachedSessionID() string
|
||||
|
||||
// RegisterWalkerController registers the specified walker to the monitor.
|
||||
RegisterWalkerController(wc *walker.Controller)
|
||||
|
||||
// GetWalkerController returns the currently registered walker.
|
||||
GetWalkerController() *walker.Controller
|
||||
}
|
||||
|
||||
// CommandInfo is information about a command.
|
||||
|
||||
Reference in New Issue
Block a user