github.com/sfdevops1/terrra4orm@v0.11.12-beta1/configs/configload/module_mgr.go (about) 1 package configload 2 3 import ( 4 "github.com/hashicorp/terraform/registry" 5 "github.com/hashicorp/terraform/svchost/disco" 6 "github.com/spf13/afero" 7 ) 8 9 type moduleMgr struct { 10 FS afero.Afero 11 12 // CanInstall is true for a module manager that can support installation. 13 // 14 // This must be set only if FS is an afero.OsFs, because the installer 15 // (which uses go-getter) is not aware of the virtual filesystem 16 // abstraction and will always write into the "real" filesystem. 17 CanInstall bool 18 19 // Dir is the path where descendent modules are (or will be) installed. 20 Dir string 21 22 // Services is a service discovery client that will be used to find 23 // remote module registry endpoints. This object may be pre-loaded with 24 // cached discovery information. 25 Services *disco.Disco 26 27 // Registry is a client for the module registry protocol, which is used 28 // when a module is requested from a registry source. 29 Registry *registry.Client 30 31 // manifest tracks the currently-installed modules for this manager. 32 // 33 // The loader may read this. Only the installer may write to it, and 34 // after a set of updates are completed the installer must call 35 // writeModuleManifestSnapshot to persist a snapshot of the manifest 36 // to disk for use on subsequent runs. 37 manifest moduleManifest 38 }