Merge pull request #6142 from AkihiroSuda/client-expose-image-platform

client: expose (*image).platform
This commit is contained in:
Michael Crosby 2021-10-21 11:36:01 -04:00 committed by GitHub
commit 51de1d3a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,8 @@ type Image interface {
ContentStore() content.Store ContentStore() content.Store
// Metadata returns the underlying image metadata // Metadata returns the underlying image metadata
Metadata() images.Image Metadata() images.Image
// Platform returns the platform match comparer. Can be nil.
Platform() platforms.MatchComparer
} }
type usageOptions struct { type usageOptions struct {
@ -448,3 +450,7 @@ func (i *image) checkSnapshotterSupport(ctx context.Context, snapshotterName str
func (i *image) ContentStore() content.Store { func (i *image) ContentStore() content.Store {
return i.client.ContentStore() return i.client.ContentStore()
} }
func (i *image) Platform() platforms.MatchComparer {
return i.platform
}