https://github.com/bow/wf
Wait for TCP servers to be ready
https://github.com/bow/wf
Last synced: 5 months ago
JSON representation
Wait for TCP servers to be ready
- Host: GitHub
- URL: https://github.com/bow/wf
- Owner: bow
- License: bsd-3-clause
- Archived: true
- Created: 2019-12-25T17:39:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-10-26T20:23:21.000Z (over 3 years ago)
- Last Synced: 2025-08-15T03:55:30.704Z (10 months ago)
- Language: Go
- Homepage:
- Size: 131 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.adoc
- License: LICENSE
Awesome Lists containing this project
README
# wf
[](https://pkg.go.dev/github.com/bow/wf)
[](https://github.com/bow/wf/actions?query=branch%3Amaster)
[](https://codeclimate.com/github/bow/wf/test_coverage)
wf waits until TCP server(s) are ready to accept connections.
## Why?
The main use case for wf is to make containerized applications that depend
on external services more robust by waiting for those actual services to be
ready, prior to application start. wf can wait on multiple TCP servers and
is provided as a single, static binary for linux/amd64, so it can be added
into the container and used as-is.
## Usage
wf is provided as a command line application.
$ wf --help
Wait until TCP server(s) are ready to accept connections
Usage:
wf [FLAGS] ADDRESS...
Flags:
-t, --timeout duration set wait timeout (default 5s)
-f, --poll-freq duration set connection poll frequency (default 500ms)
-q, --quiet suppress waiting messages
-h, --help help for wf
--version version for wf
The functionalities themselves are provided as a Go library in the
[wait](https://godoc.org/github.com/bow/wf/wait) package. Refer to the
relevant GoDoc documentation for a complete documentation.
## Development
wf was developed using Go 1.18 on `linux/amd64`. Other versions and/or
platforms may work but have not been tested.
# Clone the repository.
$ git clone https://github.com/bow/wf
# Install the development dependencies.
$ make install-dev
# Run the tests and/or linter.
$ make test
$ make lint
# Build the wf binary.
$ make bin
# When in doubt, just run `make`.
$ make
## Credits
wf was inspired by the [wait-for-it.sh](https://github.com/vishnubob/wait-for-it) script by
@vishnubob.