Documentation ¶
Overview ¶
Package oci provides transparent caching of oci-like refs
Index ¶
- Variables
- func ConvertArch(arch, archVariant string) (string, error)
- func ConvertReference(ctx context.Context, imgCache *cache.Handle, src types.ImageReference, ...) (types.ImageReference, error)
- func ImageDigest(ctx context.Context, uri string, sys *types.SystemContext) (digest string, err error)
- func ParseImageName(ctx context.Context, imgCache *cache.Handle, uri string, ...) (types.ImageReference, error)
- type GoArch
- type ImageReference
Constants ¶
This section is empty.
Variables ¶
View Source
var ArchMap = map[string]GoArch{
"amd64": {
Arch: "amd64",
Var: "",
},
"arm32v5": {
Arch: "arm",
Var: "v5",
},
"arm32v6": {
Arch: "arm",
Var: "v6",
},
"arm32v7": {
Arch: "arm",
Var: "v7",
},
"arm64v8": {
Arch: "arm64",
Var: "v8",
},
"386": {
Arch: "386",
Var: "",
},
"ppc64le": {
Arch: "ppc64le",
Var: "",
},
"s390x": {
Arch: "s390x",
Var: "",
},
}
Functions ¶
func ConvertArch ¶ added in v1.2.0
Convert CLI options GOARCH and arch variant to recognized docker arch
func ConvertReference ¶
func ConvertReference(ctx context.Context, imgCache *cache.Handle, src types.ImageReference, sys *types.SystemContext) (types.ImageReference, error)
ConvertReference converts a source reference into a cache.ImageReference to cache its blobs
func ImageDigest ¶ added in v1.0.2
func ImageDigest(ctx context.Context, uri string, sys *types.SystemContext) (digest string, err error)
ImageDigest obtains the digest of a uri's manifest
func ParseImageName ¶
func ParseImageName(ctx context.Context, imgCache *cache.Handle, uri string, sys *types.SystemContext) (types.ImageReference, error)
ParseImageName parses a uri (e.g. docker://ubuntu) into it's transport:reference combination and then returns the proper reference
Types ¶
type ImageReference ¶
type ImageReference struct { types.ImageReference // contains filtered or unexported fields }
ImageReference wraps containers/image ImageReference type
func (*ImageReference) NewImageSource ¶
func (t *ImageReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error)
NewImageSource wraps the cache's oci-layout ref to first download the real source image to the cache
Click to show internal directories.
Click to hide internal directories.