@@ -64,6 +64,14 @@ func (id ChainID) String() string {
6464 return string (id )
6565}
6666
67+ // Platform is the platform of a layer
68+ type Platform string
69+
70+ // String returns a string rendition of layers target platform
71+ func (id Platform ) String () string {
72+ return string (id )
73+ }
74+
6775// DiffID is the hash of an individual layer tar.
6876type DiffID digest.Digest
6977
@@ -99,6 +107,9 @@ type Layer interface {
99107 // Parent returns the next layer in the layer chain.
100108 Parent () Layer
101109
110+ // Platform returns the platform of the layer
111+ Platform () Platform
112+
102113 // Size returns the size of the entire layer chain. The size
103114 // is calculated from the total size of all files in the layers.
104115 Size () (int64 , error )
@@ -208,6 +219,7 @@ type MetadataTransaction interface {
208219 SetDiffID (DiffID ) error
209220 SetCacheID (string ) error
210221 SetDescriptor (distribution.Descriptor ) error
222+ SetPlatform (Platform ) error
211223 TarSplitWriter (compressInput bool ) (io.WriteCloser , error )
212224
213225 Commit (ChainID ) error
@@ -228,6 +240,7 @@ type MetadataStore interface {
228240 GetDiffID (ChainID ) (DiffID , error )
229241 GetCacheID (ChainID ) (string , error )
230242 GetDescriptor (ChainID ) (distribution.Descriptor , error )
243+ GetPlatform (ChainID ) (Platform , error )
231244 TarSplitReader (ChainID ) (io.ReadCloser , error )
232245
233246 SetMountID (string , string ) error
0 commit comments