mirror of
https://github.com/mudler/luet.git
synced 2025-09-09 02:59:30 +00:00
Update gomod and vendor
This commit is contained in:
40
vendor/github.com/moby/buildkit/worker/result.go
generated
vendored
Normal file
40
vendor/github.com/moby/buildkit/worker/result.go
generated
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
package worker
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/moby/buildkit/cache"
|
||||
"github.com/moby/buildkit/solver"
|
||||
)
|
||||
|
||||
func NewWorkerRefResult(ref cache.ImmutableRef, worker Worker) solver.Result {
|
||||
return &workerRefResult{&WorkerRef{ImmutableRef: ref, Worker: worker}}
|
||||
}
|
||||
|
||||
type WorkerRef struct {
|
||||
ImmutableRef cache.ImmutableRef
|
||||
Worker Worker
|
||||
}
|
||||
|
||||
func (wr *WorkerRef) ID() string {
|
||||
refID := ""
|
||||
if wr.ImmutableRef != nil {
|
||||
refID = wr.ImmutableRef.ID()
|
||||
}
|
||||
return wr.Worker.ID() + "::" + refID
|
||||
}
|
||||
|
||||
type workerRefResult struct {
|
||||
*WorkerRef
|
||||
}
|
||||
|
||||
func (r *workerRefResult) Release(ctx context.Context) error {
|
||||
if r.ImmutableRef == nil {
|
||||
return nil
|
||||
}
|
||||
return r.ImmutableRef.Release(ctx)
|
||||
}
|
||||
|
||||
func (r *workerRefResult) Sys() interface{} {
|
||||
return r.WorkerRef
|
||||
}
|
Reference in New Issue
Block a user