mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 21:47:13 +08:00
controller: move controllers out of commands into separate package
Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
24
controller/control/controller.go
Normal file
24
controller/control/controller.go
Normal file
@ -0,0 +1,24 @@
|
||||
package control
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/containerd/console"
|
||||
controllerapi "github.com/docker/buildx/controller/pb"
|
||||
)
|
||||
|
||||
type BuildxController interface {
|
||||
Invoke(ctx context.Context, ref string, options controllerapi.ContainerConfig, ioIn io.ReadCloser, ioOut io.WriteCloser, ioErr io.WriteCloser) error
|
||||
Build(ctx context.Context, options controllerapi.BuildOptions, in io.ReadCloser, w io.Writer, out console.File, progressMode string) (ref string, err error)
|
||||
Kill(ctx context.Context) error
|
||||
Close() error
|
||||
List(ctx context.Context) (res []string, _ error)
|
||||
Disconnect(ctx context.Context, ref string) error
|
||||
}
|
||||
|
||||
type ControlOptions struct {
|
||||
ServerConfig string
|
||||
Root string
|
||||
Detach bool
|
||||
}
|
Reference in New Issue
Block a user