2017-08-25 20:08:18 +00:00
|
|
|
package frontend
|
|
|
|
|
|
|
|
import (
|
2018-01-16 22:30:10 +00:00
|
|
|
"context"
|
2017-10-01 00:58:07 +00:00
|
|
|
"io"
|
2017-10-02 04:59:34 +00:00
|
|
|
|
|
|
|
"github.com/moby/buildkit/cache"
|
2018-06-30 01:35:39 +00:00
|
|
|
"github.com/moby/buildkit/client"
|
2019-12-09 20:50:21 +00:00
|
|
|
"github.com/moby/buildkit/client/llb"
|
2017-11-21 08:08:36 +00:00
|
|
|
"github.com/moby/buildkit/executor"
|
2018-07-25 06:18:21 +00:00
|
|
|
gw "github.com/moby/buildkit/frontend/gateway/client"
|
2017-10-01 00:58:07 +00:00
|
|
|
digest "github.com/opencontainers/go-digest"
|
2017-08-25 20:08:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Frontend interface {
|
2020-02-07 19:53:18 +00:00
|
|
|
Solve(ctx context.Context, llb FrontendLLBBridge, opt map[string]string, inputs map[string]llb.State) (*Result, error)
|
2017-08-25 20:08:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type FrontendLLBBridge interface {
|
2018-07-11 23:51:41 +00:00
|
|
|
Solve(ctx context.Context, req SolveRequest) (*Result, error)
|
2019-12-09 20:50:21 +00:00
|
|
|
ResolveImageConfig(ctx context.Context, ref string, opt llb.ResolveImageConfigOpt) (digest.Digest, []byte, error)
|
2017-11-21 08:08:36 +00:00
|
|
|
Exec(ctx context.Context, meta executor.Meta, rootfs cache.ImmutableRef, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error
|
2017-08-25 20:08:18 +00:00
|
|
|
}
|
2017-10-05 05:31:18 +00:00
|
|
|
|
2018-07-25 06:18:21 +00:00
|
|
|
type SolveRequest = gw.SolveRequest
|
2018-06-30 01:35:39 +00:00
|
|
|
|
2018-09-11 08:02:46 +00:00
|
|
|
type CacheOptionsEntry = gw.CacheOptionsEntry
|
|
|
|
|
2018-06-30 01:35:39 +00:00
|
|
|
type WorkerInfos interface {
|
|
|
|
WorkerInfos() []client.WorkerInfo
|
|
|
|
}
|