mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/moby/buildkit 25bec7145b39 (v0.14.0-dev)
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
20
vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
generated
vendored
20
vendor/github.com/moby/buildkit/util/contentutil/multiprovider.go
generated
vendored
@ -51,26 +51,6 @@ func (mp *MultiProvider) SnapshotLabels(descs []ocispecs.Descriptor, index int)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (mp *MultiProvider) CheckDescriptor(ctx context.Context, desc ocispecs.Descriptor) error {
|
||||
type checkDescriptor interface {
|
||||
CheckDescriptor(context.Context, ocispecs.Descriptor) error
|
||||
}
|
||||
|
||||
mp.mu.RLock()
|
||||
if p, ok := mp.sub[desc.Digest]; ok {
|
||||
mp.mu.RUnlock()
|
||||
if cd, ok := p.(checkDescriptor); ok {
|
||||
return cd.CheckDescriptor(ctx, desc)
|
||||
}
|
||||
} else {
|
||||
mp.mu.RUnlock()
|
||||
}
|
||||
if cd, ok := mp.base.(checkDescriptor); ok {
|
||||
return cd.CheckDescriptor(ctx, desc)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// ReaderAt returns a content.ReaderAt
|
||||
func (mp *MultiProvider) ReaderAt(ctx context.Context, desc ocispecs.Descriptor) (content.ReaderAt, error) {
|
||||
mp.mu.RLock()
|
||||
|
Reference in New Issue
Block a user