Update go dependencies
This commit is contained in:
parent
e0561ddeb9
commit
88a2751234
1970 changed files with 413928 additions and 222867 deletions
14
vendor/k8s.io/kubernetes/pkg/cloudprovider/plugins.go
generated
vendored
14
vendor/k8s.io/kubernetes/pkg/cloudprovider/plugins.go
generated
vendored
|
|
@ -37,6 +37,8 @@ var (
|
|||
providers = make(map[string]Factory)
|
||||
)
|
||||
|
||||
const externalCloudProvider = "external"
|
||||
|
||||
// RegisterCloudProvider registers a cloudprovider.Factory by name. This
|
||||
// is expected to happen during app startup.
|
||||
func RegisterCloudProvider(name string, cloud Factory) {
|
||||
|
|
@ -71,7 +73,7 @@ func CloudProviders() []string {
|
|||
}
|
||||
|
||||
// GetCloudProvider creates an instance of the named cloud provider, or nil if
|
||||
// the name is not known. The error return is only used if the named provider
|
||||
// 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 configuation.
|
||||
|
|
@ -85,6 +87,11 @@ func GetCloudProvider(name string, config io.Reader) (Interface, error) {
|
|||
return f(config)
|
||||
}
|
||||
|
||||
// Detects if the string is an external cloud provider
|
||||
func IsExternal(name string) bool {
|
||||
return name == externalCloudProvider
|
||||
}
|
||||
|
||||
// InitCloudProvider creates an instance of the named cloud provider.
|
||||
func InitCloudProvider(name string, configFilePath string) (Interface, error) {
|
||||
var cloud Interface
|
||||
|
|
@ -95,6 +102,11 @@ func InitCloudProvider(name string, configFilePath string) (Interface, error) {
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
if IsExternal(name) {
|
||||
glog.Info("External cloud provider specified")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if configFilePath != "" {
|
||||
var config *os.File
|
||||
config, err = os.Open(configFilePath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue