mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.8
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
60
vendor/github.com/moby/buildkit/frontend/gateway/client/client.go
generated
vendored
60
vendor/github.com/moby/buildkit/frontend/gateway/client/client.go
generated
vendored
@ -2,6 +2,7 @@ package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
|
||||
"github.com/moby/buildkit/client/llb"
|
||||
"github.com/moby/buildkit/solver/pb"
|
||||
@ -16,6 +17,64 @@ type Client interface {
|
||||
ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error)
|
||||
BuildOpts() BuildOpts
|
||||
Inputs(ctx context.Context) (map[string]llb.State, error)
|
||||
NewContainer(ctx context.Context, req NewContainerRequest) (Container, error)
|
||||
}
|
||||
|
||||
// NewContainerRequest encapsulates the requirements for a client to define a
|
||||
// new container, without defining the initial process.
|
||||
type NewContainerRequest struct {
|
||||
Mounts []Mount
|
||||
NetMode pb.NetMode
|
||||
Platform *pb.Platform
|
||||
Constraints *pb.WorkerConstraints
|
||||
}
|
||||
|
||||
// Mount allows clients to specify a filesystem mount. A Reference to a
|
||||
// previously solved Result is required.
|
||||
type Mount struct {
|
||||
Selector string
|
||||
Dest string
|
||||
ResultID string
|
||||
Ref Reference
|
||||
Readonly bool
|
||||
MountType pb.MountType
|
||||
CacheOpt *pb.CacheOpt
|
||||
SecretOpt *pb.SecretOpt
|
||||
SSHOpt *pb.SSHOpt
|
||||
}
|
||||
|
||||
// Container is used to start new processes inside a container and release the
|
||||
// container resources when done.
|
||||
type Container interface {
|
||||
Start(context.Context, StartRequest) (ContainerProcess, error)
|
||||
Release(context.Context) error
|
||||
}
|
||||
|
||||
// StartRequest encapsulates the arguments to define a process within a
|
||||
// container.
|
||||
type StartRequest struct {
|
||||
Args []string
|
||||
Env []string
|
||||
User string
|
||||
Cwd string
|
||||
Tty bool
|
||||
Stdin io.ReadCloser
|
||||
Stdout, Stderr io.WriteCloser
|
||||
SecurityMode pb.SecurityMode
|
||||
}
|
||||
|
||||
// WinSize is same as executor.WinSize, copied here to prevent circular package
|
||||
// dependencies.
|
||||
type WinSize struct {
|
||||
Rows uint32
|
||||
Cols uint32
|
||||
}
|
||||
|
||||
// ContainerProcess represents a process within a container.
|
||||
type ContainerProcess interface {
|
||||
Wait() error
|
||||
Resize(ctx context.Context, size WinSize) error
|
||||
// TODO Signal(ctx context.Context, sig os.Signal)
|
||||
}
|
||||
|
||||
type Reference interface {
|
||||
@ -46,6 +105,7 @@ type StatRequest struct {
|
||||
|
||||
// SolveRequest is same as frontend.SolveRequest but avoiding dependency
|
||||
type SolveRequest struct {
|
||||
Evaluate bool
|
||||
Definition *pb.Definition
|
||||
Frontend string
|
||||
FrontendOpt map[string]string
|
||||
|
Reference in New Issue
Block a user