当前位置: 首页>>代码示例>>Golang>>正文


Golang plugin.RegisterDriver函数代码示例

本文整理汇总了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
}
开发者ID:rawlingsj,项目名称:gofabric8,代码行数:16,代码来源:client.go

示例2: main

func main() {
	if len(os.Args) >= 2 && os.Args[1] == "xhyve" {
		runXhyve()
	} else {
		plugin.RegisterDriver(xhyve.NewDriver("", ""))
	}
}
开发者ID:fayep,项目名称:docker-machine-driver-xhyve,代码行数:7,代码来源:main.go

示例3: main

func main() {
	plugin.RegisterDriver(&Driver{
		BaseDriver: &drivers.BaseDriver{
			SSHUser: DefaultSSHUserName,
			SSHPort: 22,
		}})
}
开发者ID:yadutaf,项目名称:docker-machine-driver-ovh,代码行数:7,代码来源:main.go

示例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)
}
开发者ID:Parallels,项目名称:docker-machine-parallels,代码行数:14,代码来源:main.go

示例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("", ""))
}
开发者ID:ucloud,项目名称:docker-machine-ucloud,代码行数:3,代码来源:main.go

示例7: main

func main() {
	plugin.RegisterDriver(new(packet.Driver))
}
开发者ID:packethost,项目名称:docker-machine-driver-packet,代码行数:3,代码来源:main.go

示例8: main

func main() {
	plugin.RegisterDriver(cloudstack.NewDriver("", ""))
}
开发者ID:atsaki,项目名称:docker-machine-driver-cloudstack,代码行数:3,代码来源:main.go

示例9: main

func main() {
	plugin.RegisterDriver(virtualbox.NewDriver("", ""))
}
开发者ID:usmanismail,项目名称:machine,代码行数:3,代码来源:machine-driver-virtualbox.go

示例10: main

func main() {
	plugin.RegisterDriver(kvm.NewDriver())
}
开发者ID:makuk66,项目名称:docker-machine-kvm,代码行数:3,代码来源:main.go

示例11: main

func main() {
	plugin.RegisterDriver(&Driver{
		Driver: openstack.NewDerivedDriver("", ""),
	})
}
开发者ID:nfranchet,项目名称:docker-machine-driver-ovh,代码行数:5,代码来源:main.go

示例12: main

func main() {
	plugin.RegisterDriver(new(vmwareappcatalyst.Driver))
}
开发者ID:vmware,项目名称:docker-machine-driver-vmwareappcatalyst,代码行数:3,代码来源:main.go

示例13: main

func main() {
	plugin.RegisterDriver(hypriot.NewDriver("", ""))
}
开发者ID:hypriot,项目名称:docker-machine-hypriot,代码行数:3,代码来源:main.go

示例14: main

func main() {
	plugin.RegisterDriver(generic.NewDriver("", ""))
}
开发者ID:usmanismail,项目名称:machine,代码行数:3,代码来源:machine-driver-generic.go

示例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))
}
开发者ID:namtzigla,项目名称:docker-machine-driver-triton,代码行数:6,代码来源:main.go


注:本文中的github.com/docker/machine/libmachine/drivers/plugin.RegisterDriver函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。