modulepackage
0.0.0-20200313044330-ac7a7c1ee092
Repository: https://github.com/csigo/test.git
Documentation: pkg.go.dev
# README
test
External service launcher for running unit test
Docker images
Pull the following image before start
docker pull elasticsearch:2.4 redis:3-alpine quay.io/coreos/etcd nats
# Packages
No description provided by the author
# Functions
ApplyTemplate applies given variables to the "tplStr" and stores to "filePath".
BookPorts books free portsx.
CheckExecutable checks if given names are executables.
CheckListening checks if localhost is listening given ports.
CombineError given errors into one err, note that nil error will be ignored.
Exec runs "name" and "arg" in directory "workdir" with environements "envs" and wait util process finined.
No description provided by the author
NewDockerClient create docker client via unix socket.
NewServiceDocker returns an instance of ServiceDocker TODO: with specified docker address.
NewServiceLauncher returns an instance of ServiceLauncher.
No description provided by the author
No description provided by the author
No description provided by the author
RegisterService registers a service factory of the given type.
RemoveContainer remove the started container.
SetCommand set the command for the container.
SetEnv set the command for the container.
TODO:PortBindings: map[docker.Port][]docker.PortBinding{ "8888/tcp": {{HostIP: "", HostPort: "12345"}},}, SetExposedPorts accepts format as "1234/tcp", "5678/udp".
SetImage set the docker image for the container.
StartContainer starts the required container.
WaitPortAvail waits until the port becomes dialable.
# Structs
No description provided by the author
# Interfaces
HbaseService represents hbase service.
Service represents a service.
ServiceDocker defines an interface to create service via docker.
ServiceLauncher defines an interface to create service.
# Type aliases
ContainerOptionFunc is a function that configures a Client.
ServiceFactory represents service factory.
ServiceOption defines option function to setup service.
ServiceType defines type.