Merge pull request #230 from AkihiroSuda/sed-resolve-vertex
worker, solver: s/ResolveVertex/ResolveOp/gdocker-18.09
commit
ff9d77a7f4
|
@ -29,7 +29,7 @@ func NewLLBOpSolver(opt LLBOpt) *Solver {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return w.ResolveVertex(v, s)
|
return w.ResolveOp(v, s)
|
||||||
}, opt.WorkerController, determineVertexWorker, opt.Frontends, opt.CacheExporter, opt.CacheImporter)
|
}, opt.WorkerController, determineVertexWorker, opt.Frontends, opt.CacheExporter, opt.CacheImporter)
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,7 +215,7 @@ func NewWorker(opt WorkerOpt) (*Worker, error) {
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Worker) ResolveVertex(v solver.Vertex, s worker.SubBuilder) (solver.Op, error) {
|
func (w *Worker) ResolveOp(v solver.Vertex, s worker.SubBuilder) (solver.Op, error) {
|
||||||
switch op := v.Sys().(type) {
|
switch op := v.Sys().(type) {
|
||||||
case *pb.Op_Source:
|
case *pb.Op_Source:
|
||||||
return llbop.NewSourceOp(v, op, w.SourceManager)
|
return llbop.NewSourceOp(v, op, w.SourceManager)
|
||||||
|
|
|
@ -19,8 +19,8 @@ type SubBuilder interface {
|
||||||
|
|
||||||
type Worker interface {
|
type Worker interface {
|
||||||
InstructionCache() instructioncache.InstructionCache
|
InstructionCache() instructioncache.InstructionCache
|
||||||
// ResolveVertex resolves Vertex.Sys() to Op implementation. SubBuilder is needed for pb.Op_Build.
|
// ResolveOp resolves Vertex.Sys() to Op implementation. SubBuilder is needed for pb.Op_Build.
|
||||||
ResolveVertex(v types.Vertex, s SubBuilder) (types.Op, error)
|
ResolveOp(v types.Vertex, s SubBuilder) (types.Op, error)
|
||||||
ResolveImageConfig(ctx context.Context, ref string) (digest.Digest, []byte, error)
|
ResolveImageConfig(ctx context.Context, ref string) (digest.Digest, []byte, error)
|
||||||
// Exec is similar to executor.Exec but without []mount.Mount
|
// Exec is similar to executor.Exec but without []mount.Mount
|
||||||
Exec(ctx context.Context, meta executor.Meta, rootFS cache.ImmutableRef, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error
|
Exec(ctx context.Context, meta executor.Meta, rootFS cache.ImmutableRef, stdin io.ReadCloser, stdout, stderr io.WriteCloser) error
|
||||||
|
|
Loading…
Reference in New Issue