mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 21:47:13 +08:00
vendor: github.com/containerd/containerd/v2 v2.0.4
full diff: https://github.com/containerd/containerd/compare/v2.0.3...v2.0.4 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
4
vendor/github.com/containerd/containerd/v2/core/images/image.go
generated
vendored
4
vendor/github.com/containerd/containerd/v2/core/images/image.go
generated
vendored
@ -369,8 +369,8 @@ func Children(ctx context.Context, provider content.Provider, desc ocispec.Descr
|
||||
}
|
||||
|
||||
return append([]ocispec.Descriptor{}, index.Manifests...), nil
|
||||
} else if !IsLayerType(desc.MediaType) && !IsKnownConfig(desc.MediaType) {
|
||||
// Layers and configs are childless data types and should not be logged.
|
||||
} else if !IsLayerType(desc.MediaType) && !IsKnownConfig(desc.MediaType) && !IsAttestationType(desc.MediaType) {
|
||||
// Layers, configs, and attestations are childless data types and should not be logged.
|
||||
log.G(ctx).Debugf("encountered unknown type %v; children may not be fetched", desc.MediaType)
|
||||
}
|
||||
return nil, nil
|
||||
|
13
vendor/github.com/containerd/containerd/v2/core/images/mediatypes.go
generated
vendored
13
vendor/github.com/containerd/containerd/v2/core/images/mediatypes.go
generated
vendored
@ -58,6 +58,9 @@ const (
|
||||
|
||||
MediaTypeImageLayerEncrypted = ocispec.MediaTypeImageLayer + "+encrypted"
|
||||
MediaTypeImageLayerGzipEncrypted = ocispec.MediaTypeImageLayerGzip + "+encrypted"
|
||||
|
||||
// In-toto attestation
|
||||
MediaTypeInToto = "application/vnd.in-toto+json"
|
||||
)
|
||||
|
||||
// DiffCompression returns the compression as defined by the layer diff media
|
||||
@ -193,6 +196,16 @@ func IsKnownConfig(mt string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// IsAttestationType returns true if the media type is an attestation type
|
||||
func IsAttestationType(mt string) bool {
|
||||
switch mt {
|
||||
case MediaTypeInToto:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
// ChildGCLabels returns the label for a given descriptor to reference it
|
||||
func ChildGCLabels(desc ocispec.Descriptor) []string {
|
||||
mt := desc.MediaType
|
||||
|
2
vendor/github.com/containerd/containerd/v2/core/remotes/handlers.go
generated
vendored
2
vendor/github.com/containerd/containerd/v2/core/remotes/handlers.go
generated
vendored
@ -80,6 +80,8 @@ func MakeRefKey(ctx context.Context, desc ocispec.Descriptor) string {
|
||||
return "layer-" + key
|
||||
case images.IsKnownConfig(desc.MediaType):
|
||||
return "config-" + key
|
||||
case images.IsAttestationType(desc.MediaType):
|
||||
return "attestation-" + key
|
||||
default:
|
||||
log.G(ctx).Warnf("reference for unknown type: %s", desc.MediaType)
|
||||
return "unknown-" + key
|
||||
|
3
vendor/github.com/containerd/containerd/v2/version/version.go
generated
vendored
3
vendor/github.com/containerd/containerd/v2/version/version.go
generated
vendored
@ -19,11 +19,12 @@ package version
|
||||
import "runtime"
|
||||
|
||||
var (
|
||||
Name = "containerd"
|
||||
// Package is filled at linking time
|
||||
Package = "github.com/containerd/containerd/v2"
|
||||
|
||||
// Version holds the complete version number. Filled in at linking time.
|
||||
Version = "2.0.3+unknown"
|
||||
Version = "2.0.4+unknown"
|
||||
|
||||
// Revision is filled with the VCS (e.g. git) revision being used to build
|
||||
// the program at linking time.
|
||||
|
Reference in New Issue
Block a user