Skip to content

Wait container is accepting TCP connections.

License

Notifications You must be signed in to change notification settings

gofn/tcp-port-wait

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tcp-port-wait

Wait container is accepting TCP connections.

Example

echo "Waiting ip:port connecting"

# FIXME: timeout is not included
sh tcp-port-wait.sh 127.0.0.1 5432

echo "Done tcp-port-wait"

Using tcpPortWait

Example

var p Port
p.Timeout = time.Duration(10) * time.Second
timeout, err := p.Check("127.0.0.1:5432")
if err != nil {
	fmt.Printf(err)
}
if timeout {
	fmt.Printf("timeout")
}

About

Wait container is accepting TCP connections.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 78.5%
  • Shell 21.5%