mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
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:
11
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/parse.go
generated
vendored
11
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/parse.go
generated
vendored
@ -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
|
||||
|
10
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/types.go
generated
vendored
10
vendor/github.com/moby/buildkit/exporter/containerimage/exptypes/types.go
generated
vendored
@ -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)
|
||||
|
Reference in New Issue
Block a user