本文整理汇总了Golang中github.com/docker/machine/libmachine/drivers/plugin.RegisterDriver函数的典型用法代码示例。如果您正苦于以下问题:Golang RegisterDriver函数的具体用法?Golang RegisterDriver怎么用?Golang RegisterDriver使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了RegisterDriver函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: StartDriver
// StartDriver starts the desired machine driver if necessary.
func StartDriver() {
if os.Getenv(localbinary.PluginEnvKey) == localbinary.PluginEnvVal {
driverName := os.Getenv(localbinary.PluginEnvDriverName)
switch driverName {
case "virtualbox":
plugin.RegisterDriver(virtualbox.NewDriver("", ""))
case "vmwarefusion":
plugin.RegisterDriver(vmwarefusion.NewDriver("", ""))
default:
glog.Exitf("Unsupported driver: %s\n", driverName)
}
return
}
localbinary.CurrentBinaryIsDockerMachine = true
}
示例2: main
func main() {
if len(os.Args) >= 2 && os.Args[1] == "xhyve" {
runXhyve()
} else {
plugin.RegisterDriver(xhyve.NewDriver("", ""))
}
}
示例3: main
func main() {
plugin.RegisterDriver(&Driver{
BaseDriver: &drivers.BaseDriver{
SSHUser: DefaultSSHUserName,
SSHPort: 22,
}})
}
示例4: main
func main() {
cli.AppHelpTemplate = appHelpTemplate
app := cli.NewApp()
app.Name = path.Base(os.Args[0])
app.Usage = "This is a Docker Machine plugin binary. Please use it through the main 'docker-machine' binary."
app.Author = "Parallels IP Holdings GmbH"
app.Email = "https://github.com/Parallels/docker-machine-parallels/"
app.Version = parallels.FullVersion()
app.Action = func(c *cli.Context) {
plugin.RegisterDriver(parallels.NewDriver("", ""))
}
app.Run(os.Args)
}
示例5: main
func main() {
cli.AppHelpTemplate = appHelpTemplate
app := cli.NewApp()
app.Name = path.Base(os.Args[0])
app.Usage = "This is a Docker Machine plugin binary. Please use it through the main 'docker-machine' binary."
app.Author = "Kazumichi Yamamoto([email protected])"
app.Email = "https://github.com/yamamoto-febc/docker-machine-sakuracloud/"
app.Version = version.FullVersion()
app.Action = func(c *cli.Context) {
plugin.RegisterDriver(driver.NewDriver("", ""))
}
app.CommandNotFound = cmdNotFound
app.Commands = commands.Commands
app.Flags = commands.Flags
app.EnableBashCompletion = true
app.Run(os.Args)
}
开发者ID:yamamoto-febc,项目名称:docker-machine-sakuracloud,代码行数:18,代码来源:docker-machine-driver-sakuracloud.go
示例6: main
func main() {
plugin.RegisterDriver(ucloud.NewDriver("", ""))
}
示例7: main
func main() {
plugin.RegisterDriver(new(packet.Driver))
}
示例8: main
func main() {
plugin.RegisterDriver(cloudstack.NewDriver("", ""))
}
示例9: main
func main() {
plugin.RegisterDriver(virtualbox.NewDriver("", ""))
}
示例10: main
func main() {
plugin.RegisterDriver(kvm.NewDriver())
}
示例11: main
func main() {
plugin.RegisterDriver(&Driver{
Driver: openstack.NewDerivedDriver("", ""),
})
}
示例12: main
func main() {
plugin.RegisterDriver(new(vmwareappcatalyst.Driver))
}
示例13: main
func main() {
plugin.RegisterDriver(hypriot.NewDriver("", ""))
}
示例14: main
func main() {
plugin.RegisterDriver(generic.NewDriver("", ""))
}
示例15: main
func main() {
if os.Getenv(localbinary.PluginEnvKey) != localbinary.PluginEnvVal {
fmt.Printf("VERSION: %s, COMMIT: %s\n", Version, GitCommit)
}
plugin.RegisterDriver(new(triton.Driver))
}