vendor: github.com/moby/buildkit 6bd81372ad6f (master)

- tests: implement NetNSDetached method

full diff: 6e200afad5...6bd81372ad

Co-authored-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-01-18 00:46:45 +01:00
parent 528e3ba259
commit dbaad32f49
32 changed files with 945 additions and 351 deletions

View File

@ -46,10 +46,13 @@ func ParsePlatforms(meta map[string][]byte) (Platforms, error) {
return ps, nil
}
func ParseKey(meta map[string][]byte, key string, p Platform) []byte {
if v, ok := meta[fmt.Sprintf("%s/%s", key, p.ID)]; ok {
return v
} else if v, ok := meta[key]; ok {
func ParseKey(meta map[string][]byte, key string, p *Platform) []byte {
if p != nil {
if v, ok := meta[fmt.Sprintf("%s/%s", key, p.ID)]; ok {
return v
}
}
if v, ok := meta[key]; ok {
return v
}
return nil

View File

@ -1,6 +1,9 @@
package exptypes
import (
"context"
"github.com/moby/buildkit/solver/result"
ocispecs "github.com/opencontainers/image-spec/specs-go/v1"
)
@ -10,7 +13,6 @@ const (
ExporterImageConfigKey = "containerimage.config"
ExporterImageConfigDigestKey = "containerimage.config.digest"
ExporterImageDescriptorKey = "containerimage.descriptor"
ExporterInlineCache = "containerimage.inlinecache"
ExporterPlatformsKey = "refs.platforms"
)
@ -18,7 +20,6 @@ const (
// a platform to become platform specific
var KnownRefMetadataKeys = []string{
ExporterImageConfigKey,
ExporterInlineCache,
}
type Platforms struct {
@ -29,3 +30,8 @@ type Platform struct {
ID string
Platform ocispecs.Platform
}
type InlineCacheEntry struct {
Data []byte
}
type InlineCache func(ctx context.Context) (*result.Result[*InlineCacheEntry], error)