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