@@ -154,7 +154,11 @@ func (d *depot) SetCacheSize(mb int) {
154154 d .cacheSize = int64 (mb ) * MB
155155}
156156
157- // Note: the returned artifactInfo may be nil for depot artifacts that predate this functionality.
157+ // Exists returns whether or not an artifact ID exists in the depot, along with any known metadata
158+ // associated with that artifact ID.
159+ // Existence is merely whether a directory with the name of the given ID exists on the filesystem.
160+ // Artifact metadata comes from the depot's cache, and may not exist for installed artifacts that
161+ // predate the cache.
158162func (d * depot ) Exists (id strfmt.UUID ) (bool , * artifactInfo ) {
159163 if _ , ok := d .artifacts [id ]; ok {
160164 if artifact , exists := d .config .Cache [id ]; exists {
@@ -186,6 +190,7 @@ func (d *depot) Put(id strfmt.UUID) error {
186190}
187191
188192// DeployViaLink will take an artifact from the depot and link it to the target path.
193+ // It should return deployment info to be used for tracking the artifact.
189194func (d * depot ) DeployViaLink (id strfmt.UUID , relativeSrc , absoluteDest string ) (* deployment , error ) {
190195 d .fsMutex .Lock ()
191196 defer d .fsMutex .Unlock ()
@@ -233,6 +238,7 @@ func (d *depot) DeployViaLink(id strfmt.UUID, relativeSrc, absoluteDest string)
233238}
234239
235240// DeployViaCopy will take an artifact from the depot and copy it to the target path.
241+ // It should return deployment info to be used for tracking the artifact.
236242func (d * depot ) DeployViaCopy (id strfmt.UUID , relativeSrc , absoluteDest string ) (* deployment , error ) {
237243 d .fsMutex .Lock ()
238244 defer d .fsMutex .Unlock ()
0 commit comments