forked from docker/machine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX docker#2663 reduce calls to the driver in ls
Signed-off-by: David Gageot <david@gageot.net>
- Loading branch information
Showing
7 changed files
with
82 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,41 @@ | ||
package mcndockerclient | ||
|
||
import "github.com/docker/machine/libmachine/auth" | ||
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.