Files
docker-docs/provider/provider.go
Evan Hazlett 3347d1e82f rename HypervisorType to ProviderType
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2015-03-09 16:03:36 -04:00

26 lines
409 B
Go

package provider
// ProviderType represents the type of a provider for a machine
type ProviderType int
const (
None ProviderType = iota
Local
Remote
)
var providerTypes = []string{
"",
"Local",
"Remote",
}
// Given a type, returns its string representation
func (t ProviderType) String() string {
if int(t) >= 0 && int(t) < len(providerTypes) {
return providerTypes[t]
} else {
return ""
}
}