rust-for-it is a lookalike of (the perfectly fine) Python wait-for-it written in Rust 1.69+.
It supports waiting for multiple services concurrently by default, and has a test coverage of >90%. If you do find bugs, please file a report. Thank you!
$ cargo run -- --help
… or …
$ cargo build
$ export PATH="${PWD}/target/debug:${PATH}"
$ rust-for-it --help
$ rust-for-it -t 2 -s [::1]:631 -s localhost:631 -s 127.0.0.1:631 -- echo 'CUPS is very available'
[*] Waiting 2 seconds for localhost:631...
[*] Waiting 2 seconds for [::1]:631...
[+] [::1]:631 is available after 0 seconds.
[*] Waiting 2 seconds for 127.0.0.1:631...
[+] 127.0.0.1:631 is available after 0 seconds.
[+] localhost:631 is available after 0 seconds.
CUPS is very available
$ rust-for-it --help
Wait for one or more services to be available before executing a command.
Usage: rust-for-it [OPTIONS] [command]...
Arguments:
[command]... Command to run after waiting;
includes command arguments, resolved against ${PATH}
Options:
-q, --quiet Do not output any status messages
-S, --strict Only execute <command> if all services are found available [default: always executes]
-t, --timeout <seconds> Timeout in seconds, 0 for no timeout [default: 15]
-s, --service [<host:port>...] Service to test via the TCP protocol; can be passed multiple times
-h, --help Print help
-V, --version Print version
github.com/alioygur/wait-for
github.com/hartwork/go-wait-for-it
github.com/maxcnunes/waitforit
github.com/mjeri/go-wait-for-it
github.com/clarketm/wait-for-it
— packagewait-for-it
on PyPIgithub.com/David-Lor/python-wait4it
— packagewait4it
on PyPI
github.com/Etenil/wait-for-rust
github.com/hartwork/rust-for-it
— the one you are looking atgithub.com/ktitaro/wait-for
— packagewait_for
on crates.iogithub.com/magiclen/wait-service
— packagewait-service
on crates.iogithub.com/shenek/wait-for-them
— packagewait-for-them
on crates.io
github.com/eficode/wait-for
— POSIX shellgithub.com/vishnubob/wait-for-it
— Bash, packagewait-for-it
in Debian