internal/providercache: Stub of Dir.InstallPackage method

This will eventually be responsible for actually retrieving a package from
a source and then installing it into the cache directory, but for the
moment it's just a stub to complete the proposed API, which I intend to
test in a subsequent commit by writing the full "Installer" API that will
encapsulate the full installation logic.
This commit is contained in:
Martin Atkins 2020-03-11 18:10:25 -07:00
parent 67ca067910
commit e4d14324e0
1 changed files with 8 additions and 0 deletions

View File

@ -9,6 +9,14 @@ import (
"github.com/hashicorp/terraform/internal/getproviders"
)
// InstallPackage takes a metadata object describing a package available for
// installation, retrieves that package, and installs it into the receiving
// cache directory.
func (d *Dir) InstallPackage(meta getproviders.PackageMeta) error {
// TODO: Implement this
return fmt.Errorf("InstallPackage is not yet implemented")
}
// LinkFromOtherCache takes a CachedProvider value produced from another Dir
// and links it into the cache represented by the receiver Dir.
//