1 Star 0 Fork 0

powerpaas/machine

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker_host.go 711 Bytes
一键复制 编辑 原始数据 按行查看 历史
David Gageot 提交于 2016-01-04 09:08 . FIX #2703 Update dockerclient
package mcndockerclient
import (
"fmt"
"github.com/docker/machine/libmachine/auth"
)
type URLer interface {
// URL returns the Docker host URL
URL() (string, error)
}
type AuthOptionser interface {
// AuthOptions returns the authOptions
AuthOptions() *auth.Options
}
type DockerHost interface {
URLer
AuthOptionser
}
type RemoteDocker struct {
HostURL string
AuthOption *auth.Options
}
// URL returns the Docker host URL
func (rd *RemoteDocker) URL() (string, error) {
if rd.HostURL == "" {
return "", fmt.Errorf("Docker Host URL not set")
}
return rd.HostURL, nil
}
// AuthOptions returns the authOptions
func (rd *RemoteDocker) AuthOptions() *auth.Options {
return rd.AuthOption
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/powerpaas/machine.git
git@gitee.com:powerpaas/machine.git
powerpaas
machine
machine
v0.15.0-rancher2

搜索帮助