Files
docker-machine/libmachine/provision/errors.go
Nathan LeClaire 9453df4859 Fix Docker daemon wait
Also, a few various cleanups are bundled:

1. Only call GetDriver() once to get the object in provision/utils.go
2. SSH command wrapper will return the error and let the consumer decide
   what to do with it instead of bailing automatically on non-255

Signed-off-by: Nathan LeClaire <nathan.leclaire@gmail.com>
2015-09-23 15:19:25 -07:00

27 lines
537 B
Go

package provision
import (
"errors"
"fmt"
)
var (
ErrDetectionFailed = errors.New("OS type not recognized")
ErrSSHCommandFailed = errors.New("SSH command failure")
ErrNotImplemented = errors.New("Runtime not implemented")
)
type ErrDaemonAvailable struct {
wrappedErr error
}
func (e ErrDaemonAvailable) Error() string {
return fmt.Sprintf("Unable to verify the Docker daemon is listening: %s", e.wrappedErr)
}
func NewErrDaemonAvailable(err error) ErrDaemonAvailable {
return ErrDaemonAvailable{
wrappedErr: err,
}
}