mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-17 16:37:46 +08:00

Remove the controller grpc service along with associated code related to sessions or remote controllers. Data types that are still used with complicated dependency chains have been kept in the same package for a future refactor. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
27 lines
1.2 KiB
Go
27 lines
1.2 KiB
Go
package control
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
|
|
"github.com/docker/buildx/build"
|
|
cbuild "github.com/docker/buildx/controller/build"
|
|
controllerapi "github.com/docker/buildx/controller/pb"
|
|
"github.com/docker/buildx/controller/processes"
|
|
"github.com/docker/buildx/util/progress"
|
|
"github.com/moby/buildkit/client"
|
|
)
|
|
|
|
type BuildxController interface {
|
|
Build(ctx context.Context, options *cbuild.Options, in io.ReadCloser, progress progress.Writer) (resp *client.SolveResponse, inputs *build.Inputs, err error)
|
|
// Invoke starts an IO session into the specified process.
|
|
// If pid doesn't match to any running processes, it starts a new process with the specified config.
|
|
// If there is no container running or InvokeConfig.Rollback is specified, the process will start in a newly created container.
|
|
// NOTE: If needed, in the future, we can split this API into three APIs (NewContainer, NewProcess and Attach).
|
|
Invoke(ctx context.Context, pid string, options *controllerapi.InvokeConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error
|
|
Close() error
|
|
ListProcesses(ctx context.Context) (infos []*processes.ProcessInfo, retErr error)
|
|
DisconnectProcess(ctx context.Context, pid string) error
|
|
Inspect(ctx context.Context) *cbuild.Options
|
|
}
|