The docker package and its StartDbInDocker function should only be used by the `boundary dev` command now. So moving it into an internal package of `base` will prevent it from being use for tests accidentally, while still allowing it to be used for `boundary dev`.
19 lines
454 B
Go
19 lines
454 B
Go
package docker
|
|
|
|
import (
|
|
"errors"
|
|
"sync"
|
|
)
|
|
|
|
var (
|
|
StartDbInDocker func(dialect string, opt ...Option) (func() error, string, string, error) = startDbInDockerUnsupported
|
|
|
|
ErrDockerUnsupported = errors.New("docker is not currently supported on this platform")
|
|
|
|
mx = sync.Mutex{}
|
|
)
|
|
|
|
func startDbInDockerUnsupported(dialect string, opt ...Option) (cleanup func() error, retURL, container string, err error) {
|
|
return nil, "", "", ErrDockerUnsupported
|
|
}
|