2017-08-25 20:08:18 +00:00
|
|
|
package frontend
|
|
|
|
|
|
|
|
import (
|
2017-10-01 00:58:07 +00:00
|
|
|
"io"
|
2017-10-02 04:59:34 +00:00
|
|
|
|
|
|
|
"github.com/moby/buildkit/cache"
|
|
|
|
"github.com/moby/buildkit/solver/pb"
|
2017-10-01 00:58:07 +00:00
|
|
|
"github.com/moby/buildkit/worker"
|
|
|
|
digest "github.com/opencontainers/go-digest"
|
|
|
|
"golang.org/x/net/context"
|
2017-08-25 20:08:18 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type Frontend interface {
|
2017-10-02 04:59:34 +00:00
|
|
|
Solve(ctx context.Context, llbBridge FrontendLLBBridge, opt map[string]string) (cache.ImmutableRef, map[string]interface{}, error)
|
2017-08-25 20:08:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type FrontendLLBBridge interface {
|
2017-10-01 00:58:07 +00:00
|
|
|
Solve(ctx context.Context, def *pb.Definition, frontend string) (cache.ImmutableRef, map[string]interface{}, error)
|
2017-09-22 22:49:37 +00:00
|
|
|
ResolveImageConfig(ctx context.Context, ref string) (digest.Digest, []byte, error)
|
2017-10-01 00:58:07 +00:00
|
|
|
Exec(ctx context.Context, meta worker.Meta, rootfs cache.ImmutableRef, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error
|
2017-08-25 20:08:18 +00:00
|
|
|
}
|