Documentation ¶
Overview ¶
Example ¶
p, err := EmptyPort() if err != nil { log.Fatal(err) } cmd := exec.Command("memcached", "-p", fmt.Sprintf("%d", p)) cmd.SysProcAttr = &syscall.SysProcAttr{ Setpgid: true, } go cmd.Run() err = WaitLocalPort(p, 30*time.Second) if err != nil { log.Fatal(err) } // Now do whatever with memcached! cmd.Process.Kill()
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WaitLocalPort ¶
WaitLocalPort until you can connect to `port` on localhost, up to `dur` amount of time
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.