X Tutup
Skip to content

Commit 640ca78

Browse files
authored
Merge pull request containerd#3874 from crosbymichael/image-meta
Return the underlying images metadata
2 parents 6ed7ec4 + 6a22a8f commit 640ca78

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

image.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ type Image interface {
5858
IsUnpacked(context.Context, string) (bool, error)
5959
// ContentStore provides a content store which contains image blob data
6060
ContentStore() content.Store
61+
// Metadata returns the underlying image metadata
62+
Metadata() images.Image
6163
}
6264

6365
type usageOptions struct {
@@ -130,6 +132,10 @@ type image struct {
130132
platform platforms.MatchComparer
131133
}
132134

135+
func (i *image) Metadata() images.Image {
136+
return i.i
137+
}
138+
133139
func (i *image) Name() string {
134140
return i.i.Name
135141
}

0 commit comments

Comments
 (0)
X Tutup