type Factory … var providersMutex … var providers … const externalCloudProvider … // RegisterCloudProvider registers a cloudprovider.Factory by name. This // is expected to happen during app startup. func RegisterCloudProvider(name string, cloud Factory) { … } // IsCloudProvider returns true if name corresponds to an already registered // cloud provider. func IsCloudProvider(name string) bool { … } // GetCloudProvider creates an instance of the named cloud provider, or nil if // the name is unknown. The error return is only used if the named provider // was known but failed to initialize. The config parameter specifies the // io.Reader handler of the configuration file for the cloud provider, or nil // for no configuration. func GetCloudProvider(name string, config io.Reader) (Interface, error) { … } // Detects if the string is an external cloud provider func IsExternal(name string) bool { … } // DisableWarningForProvider logs information about disabled cloud provider state func DisableWarningForProvider(providerName string) { … } // ErrorForDisabledProvider returns an error formatted with the supplied provider name func ErrorForDisabledProvider(providerName string) error { … } // InitCloudProvider creates an instance of the named cloud provider. func InitCloudProvider(name string, configFilePath string) (Interface, error) { … }