github.com/quay/claircore@v1.5.28/indexer/realizer.go (about) 1 package indexer 2 3 import ( 4 "context" 5 6 "github.com/quay/claircore" 7 ) 8 9 // Realizer is responsible for downloading a layer, uncompressing 10 // if necessary, and making the uncompressed tar contents available for 11 // reading. 12 type Realizer interface { 13 Realize(context.Context, []*claircore.Layer) error 14 Close() error 15 } 16 17 // DescriptionRealizer is similar to a [Realizer], but accepts a slice of 18 // [claircore.LayerDescription] and returns a slice of populated 19 // [claircore.Layer] instead of mutating arguments in-place. 20 type DescriptionRealizer interface { 21 RealizeDescriptions(context.Context, []claircore.LayerDescription) ([]claircore.Layer, error) 22 Close() error 23 } 24 25 // FetchArena does coordination and global refcounting. 26 type FetchArena interface { 27 Realizer(context.Context) Realizer 28 Close(context.Context) error 29 }