File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -55,14 +55,19 @@ type Image struct {
55
55
Pinned bool
56
56
}
57
57
58
+ // ImageGetter is used to get images but does not make changes
59
+ type ImageGetter interface {
60
+ Get (ctx context.Context , name string ) (images.Image , error )
61
+ }
62
+
58
63
// Store stores all images.
59
64
type Store struct {
60
65
lock sync.RWMutex
61
66
// refCache is a containerd image reference to image id cache.
62
67
refCache map [string ]string
63
68
64
69
// images is the local image store
65
- images images. Store
70
+ images ImageGetter
66
71
67
72
// content provider
68
73
provider content.InfoReaderProvider
@@ -76,7 +81,7 @@ type Store struct {
76
81
}
77
82
78
83
// NewStore creates an image store.
79
- func NewStore (img images. Store , provider content.InfoReaderProvider , platform platforms.MatchComparer ) * Store {
84
+ func NewStore (img ImageGetter , provider content.InfoReaderProvider , platform platforms.MatchComparer ) * Store {
80
85
return & Store {
81
86
refCache : make (map [string ]string ),
82
87
images : img ,
You can’t perform that action at this time.
0 commit comments