https://github.com/aliuygur/wait-for
Go package to test and wait on the availability of a TCP host and port. This package is port of wait-for-it.sh
https://github.com/aliuygur/wait-for
ci docker go golang
Last synced: 6 months ago
JSON representation
Go package to test and wait on the availability of a TCP host and port. This package is port of wait-for-it.sh
- Host: GitHub
- URL: https://github.com/aliuygur/wait-for
- Owner: aliuygur
- License: gpl-3.0
- Created: 2017-12-29T07:46:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T06:23:05.000Z (about 5 years ago)
- Last Synced: 2024-06-19T13:46:07.131Z (about 2 years ago)
- Topics: ci, docker, go, golang
- Language: Go
- Size: 963 KB
- Stars: 18
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wait-for
Go package to test and wait on the availability of a TCP host and port.
This package is Go port of [wait-for-it.sh](https://github.com/vishnubob/wait-for-it)
# Usage
```bash
wait-for:
-it value
[host2:port,...] comma seperated list of services
-t int
timeout (default 20)
```
# Example
### simple
```bash
$ wait-for -it github.com:80 && echo "github is up!"
services are ready!
github is up!
```
### multiple hosts and custom timeout
```bash
$ wait-for -t 5 -it github.com:80,bitbucket.com:80 && echo "github and bitbucket are up!"
services are ready!
github and bitbucket are up!
```
### docker users
~2.7MB docker image.
```bash
$ docker run --rm alioygur/wait-for -it google.com:80
services are ready!
```