github.com/openshift/installer@v1.4.17/pkg/asset/store.go (about) 1 package asset 2 3 import ( 4 "context" 5 ) 6 7 // Store is a store for the states of assets. 8 type Store interface { 9 // Fetch retrieves the state of the given asset, generating it and its 10 // dependencies if necessary. When purging consumed assets, none of the 11 // assets in assetsToPreserve will be purged. 12 Fetch(ctx context.Context, assetToFetch Asset, assetsToPreserve ...WritableAsset) error 13 14 // Destroy removes the asset from all its internal state and also from 15 // disk if possible. 16 Destroy(Asset) error 17 18 // DestroyState removes everything from the internal state and the internal 19 // state file 20 DestroyState() error 21 22 // Load retrieves the state of the given asset but does not generate it if it 23 // does not exist and instead will return nil if not found. 24 Load(Asset) (Asset, error) 25 }