Documentation
¶
Index ¶
- func CheckSharedFolders() bool
- func Cleanup()
- func CleanupDockerContainersList() ([]dockerclient.APIContainers, error)
- func CleanupDockerImageList() ([]dockerclient.APIImages, error)
- func CreateTemplateTempFile(data func() ([]byte, error), perms os.FileMode, templateData interface{}) *os.File
- func DefaultComposeFile() string
- func DefaultParityConfigurationFile() string
- func DockerClient() *dockerclient.Client
- func DockerHost() string
- func DockerVMHost() (string, error)
- func FindDockerComposeFiles() []string
- func FindNetwork(ip string) (net.IP, net.Addr, error)
- func FindSharedFolders() []string
- func MirrorHost() string
- func ProjectNameSafe(name string) string
- func PublicKeyFile(file string) ssh.AuthMethod
- func ReadComposeVolumes() []string
- func RunCommand(host string, command string, reader io.Reader, stdOut io.Writer, ...) error
- func RunCommandAndReturn(host string, command string) (string, error)
- func RunCommandWithDefaults(host string, command string) error
- func SSHConfig() *ssh.ClientConfig
- func SSHSession(host string) (session *ssh.Session, err error)
- func UnmountSharedFolders()
- func WaitForNetwork(name string, host string)
- func WaitForNetworkWithTimeout(name string, host string, timeout time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSharedFolders ¶
func CheckSharedFolders() bool
CheckSharedFolders seturn true if shared folders exist and the user agrees to removing them
func CleanupDockerContainersList ¶
func CleanupDockerContainersList() ([]dockerclient.APIContainers, error)
CleanupDockerContainersList returns a list of containers to be removed
func CleanupDockerImageList ¶
func CleanupDockerImageList() ([]dockerclient.APIImages, error)
CleanupDockerImageList returns a list of images to be removed
func CreateTemplateTempFile ¶
func CreateTemplateTempFile(data func() ([]byte, error), perms os.FileMode, templateData interface{}) *os.File
CreateTemplateTempFile resurrects a go-bindata asset and execute the template (if any) it contains. return a reference to the temporary file
func DefaultComposeFile ¶
func DefaultComposeFile() string
DefaultComposeFile gets the default docker-compose.yml file
func DefaultParityConfigurationFile ¶
func DefaultParityConfigurationFile() string
DefaultParityConfigurationFile gets the default parity configuration file
func DockerClient ¶
func DockerClient() *dockerclient.Client
DockerClient creates a docker client from environment
func DockerHost ¶
func DockerHost() string
DockerHost gets the ip:port of the current active Docker Machine
func DockerVMHost ¶
DockerVMHost gets the IP address of the underlying VM for the current active Docker Machine
func FindDockerComposeFiles ¶
func FindDockerComposeFiles() []string
FindDockerComposeFiles returns the list of Docker Compose files in the current project. Currently just defaults to a single ['docker-compose.yml']
func FindNetwork ¶
FindNetwork will return the IP and Network interface given an IP address.
func FindSharedFolders ¶
func FindSharedFolders() []string
FindSharedFolders gets the list of shared folders on the remote Docker Host
func MirrorHost ¶
func MirrorHost() string
MirrorHost gets the ip:port of the current active Docker Machine
func ProjectNameSafe ¶
ProjectNameSafe creates a Docker Compose compatible (safe) name given a string
func PublicKeyFile ¶
func PublicKeyFile(file string) ssh.AuthMethod
PublicKeyFile reads a public key and returns an SSH auth method
func ReadComposeVolumes ¶
func ReadComposeVolumes() []string
ReadComposeVolumes reads a docker-compose.yml and return a slice of directories to sync into the Docker Host
"." and "./." is converted to the current directory parity is running from. Any volume starting with "/" will be treated as an absolute path. All other volumes (e.g. starting with "./" or without a prefix "/") will be treated as relative paths.
func RunCommand ¶
func RunCommand(host string, command string, reader io.Reader, stdOut io.Writer, stdErr io.Writer) error
RunCommand runs command on a given SSH connection
func RunCommandAndReturn ¶
RunCommandAndReturn runs a command on a given SSH Connection and return the output of Stdout
func RunCommandWithDefaults ¶
RunCommandWithDefaults runs a command on a host using the default configuration for I/O redirection
func SSHConfig ¶
func SSHConfig() *ssh.ClientConfig
SSHConfig gets an SSH configuration to the Docker Host
func SSHSession ¶
SSHSession creates an SSH Session for a remote Docker host
func UnmountSharedFolders ¶
func UnmountSharedFolders()
UnmountSharedFolders unmounts all shared folders on the remote Docker host
func WaitForNetwork ¶
WaitForNetwork waits for a network connection to become available within a timeout
Types ¶
This section is empty.