代码拉取完成,页面将自动刷新
package errdriver
import (
"fmt"
"github.com/docker/machine/libmachine/drivers"
"github.com/docker/machine/libmachine/mcnflag"
"github.com/docker/machine/libmachine/state"
)
type Driver struct {
Name string
}
type NotLoadable struct {
Name string
}
func (e NotLoadable) Error() string {
return fmt.Sprintf("Driver %q not found. Do you have the plugin binary accessible in your PATH?", e.Name)
}
func NewDriver(Name string) drivers.Driver {
return &Driver{
Name: Name,
}
}
// DriverName returns the name of the driver
func (d *Driver) DriverName() string {
return "not-found"
}
func (d *Driver) PreCreateCheck() error {
return NotLoadable{d.Name}
}
func (d *Driver) GetCreateFlags() []mcnflag.Flag {
return nil
}
func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
return NotLoadable{d.Name}
}
func (d *Driver) GetURL() (string, error) {
return "", NotLoadable{d.Name}
}
func (d *Driver) GetMachineName() string {
return d.Name
}
func (d *Driver) GetIP() (string, error) {
return "1.2.3.4", NotLoadable{d.Name}
}
func (d *Driver) GetSSHHostname() (string, error) {
return "", NotLoadable{d.Name}
}
func (d *Driver) GetSSHKeyPath() string {
return ""
}
func (d *Driver) GetSSHPort() (int, error) {
return 0, NotLoadable{d.Name}
}
func (d *Driver) GetSSHUsername() string {
return ""
}
func (d *Driver) GetState() (state.State, error) {
return state.Error, NotLoadable{d.Name}
}
func (d *Driver) Create() error {
return NotLoadable{d.Name}
}
func (d *Driver) Remove() error {
return NotLoadable{d.Name}
}
func (d *Driver) Start() error {
return NotLoadable{d.Name}
}
func (d *Driver) Stop() error {
return NotLoadable{d.Name}
}
func (d *Driver) Restart() error {
return NotLoadable{d.Name}
}
func (d *Driver) Kill() error {
return NotLoadable{d.Name}
}
func (d *Driver) Upgrade() error {
return NotLoadable{d.Name}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。