Documentation ¶
Index ¶
- Variables
- func BuildBin(path string, outputPath string) error
- func Cleanup(p *Process)
- func CopyFile(srcName, dstName string, mode os.FileMode)
- func CreateGonitCfg(numProcesses int, pname string, writePath string, procPath string, ...) error
- func CreateGonitSettings(gonitPidfile string, gonitDir string, procDir string) *Settings
- func CreateProcessGroupCfg(name string, dir string, pg *ProcessGroup) error
- func DoesProcessExist(pid int) bool
- func FindLogLine(stdout io.ReadCloser, logline string, timeout string) bool
- func NewTestProcess(name string, flags []string, detached bool) *Process
- func ProxyReadPidFile(path string) (int, error)
- func ReadData(data interface{}, file string)
- func RunGonitCmd(command string, path string) error
- func StartGonit(configDir string) (*exec.Cmd, io.ReadCloser, error)
- func StopGonit(gonitCmd *exec.Cmd, path string) error
- func TouchFile(name string, mode os.FileMode)
- func WithRpcServer(f func(c *rpc.Client)) error
- func WriteData(data interface{}, file string)
- type ProcessInfo
Constants ¶
This section is empty.
Variables ¶
var MAX_GONIT_RETRIES int = 10
var TestProcess string
Functions ¶
func BuildBin ¶
Given the path to a direcotry to build and given an optional output path, this will build the binary.
func CreateGonitCfg ¶
func CreateGonitSettings ¶
func CreateProcessGroupCfg ¶
func FindLogLine ¶
func FindLogLine(stdout io.ReadCloser, logline string, timeout string) bool
Given an stdout pipe, a logline to find and a timeout string, this will return whether the logline was printed or not.
func NewTestProcess ¶
func RunGonitCmd ¶
Given a gonit command string such as "start all", this will run the command. Path is used because we set custom pid file locations so the gonit client needs to know where the config files are for that.
func StartGonit ¶
Given a config directory, this will start gonit, output the log messages and watch gonit to print out error messages.
func StopGonit ¶
This kills all processes gonit is running, then stops gonit. Path is used because we set custom pid file locations so the gonit client needs to know where the config files are for that.