client: expose (*image).platform

Expose (*image).platform as Image.Platform() .

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2021-10-21 19:46:50 +09:00
parent ac5790c8e2
commit cd2f2b0af6
No known key found for this signature in database
GPG Key ID: 49524C6F9F638F1A

View File

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