Documentation ¶
Index ¶
- func CheckDocker() error
- func CheckDockerMachine() error
- func CreateMachine(driver drivers.Driver, name string) error
- func GetDockerFlags(name string) ([]string, error)
- func GetHostConfig(name string, config *drivers.HostConfig) error
- func GetLargestNodeIndex(nodes []string) (int, error)
- func ListCockroachNodes() ([]string, error)
- func ListMachines() ([]string, error)
- func MakeNodeName(id int) string
- func RunDockerInit(driver drivers.Driver, nodeName string, settings *drivers.HostConfig) error
- func RunDockerStart(driver drivers.Driver, nodeName string, settings *drivers.HostConfig) error
- func StartMachine(name string) error
- func StopMachine(name string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDocker ¶
func CheckDocker() error
CheckDocker verifies that docker-machine is installed and runnable.
func CheckDockerMachine ¶
func CheckDockerMachine() error
CheckDockerMachine verifies that docker-machine is installed and runnable.
func CreateMachine ¶
CreateMachine creates a new docker machine using the passed-in driver and name.
func GetDockerFlags ¶
GetDockerFlags returns the list of flags we need to pass to docker to talk to the given machine's docker daemon. We expect a single line, but then split that line into individual flags.
func GetHostConfig ¶
func GetHostConfig(name string, config *drivers.HostConfig) error
GetHostConfig gets the machine config from docker-machine. It takes an initialized driver.HostConfig struct with the Driver field initialized to the driver-specific type. The passed-in object is filled in with the contents of the config.
func GetLargestNodeIndex ¶
GetLargestNodeIndex takes a list of node names and returns the largest node index seen. Returns 0 if no nodes are passed. Fails on parsing errors.
func ListCockroachNodes ¶
ListCockroachNodes returns a list of machines that are cockroach nodes. We could use stream with grep, but let's minimize our dependencies. docker-machine is also terrible at proper exit codes.
func ListMachines ¶
ListMachines returns a list of machine names.
func MakeNodeName ¶
MakeNodeName generates a cockroach node name for the given ID.
func RunDockerInit ¶
RunDockerInit initializes the first node.
func RunDockerStart ¶
RunDockerStart starts the cockroach binary.
func StartMachine ¶
StartMachine invokes "docker-machine start" on the given machine name.
func StopMachine ¶
StopMachine invokes "docker-machine stop" on the given machine name.
Types ¶
This section is empty.