mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: update buildkit to v0.11.2
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
21
vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
generated
vendored
21
vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
generated
vendored
@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/containerd/containerd/content"
|
||||
"github.com/containerd/containerd/errdefs"
|
||||
"github.com/moby/buildkit/session"
|
||||
digest "github.com/opencontainers/go-digest"
|
||||
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
"github.com/pkg/errors"
|
||||
@ -90,3 +91,23 @@ func (mp *MultiProvider) Add(dgst digest.Digest, p content.Provider) {
|
||||
defer mp.mu.Unlock()
|
||||
mp.sub[dgst] = p
|
||||
}
|
||||
|
||||
func (mp *MultiProvider) UnlazySession(desc ocispecs.Descriptor) session.Group {
|
||||
type unlazySession interface {
|
||||
UnlazySession(ocispecs.Descriptor) session.Group
|
||||
}
|
||||
|
||||
mp.mu.RLock()
|
||||
if p, ok := mp.sub[desc.Digest]; ok {
|
||||
mp.mu.RUnlock()
|
||||
if cd, ok := p.(unlazySession); ok {
|
||||
return cd.UnlazySession(desc)
|
||||
}
|
||||
} else {
|
||||
mp.mu.RUnlock()
|
||||
}
|
||||
if cd, ok := mp.base.(unlazySession); ok {
|
||||
return cd.UnlazySession(desc)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user