Crates.io | wait-for-them |
lib.rs | wait-for-them |
version | 0.5.0 |
source | src |
created_at | 2020-03-13 23:36:35.704753 |
updated_at | 2024-09-30 06:56:06.130938 |
description | Waits for TCP ports to be opened or for 200 status on http(s) urls |
homepage | |
repository | https://github.com/shenek/wait-for-them |
max_upload_size | |
id | 218394 |
size | 208,668 |
Waits until all provided host and port pairs are opened or return status 200 in case of http(s) url. It is written using async rust.
There are currently two way how to install the app.
You can install the binary only with a minimal subset of features.
cargo install wait-for-them --no-default-features
Or you can install it with all its features (including the nice progressbars and http(s) support).
cargo install wait-for-them
wait-for-them host1:port1 host2:port2 http://host3:8080/
wait-for-them -t 5000 host1:port1 host2:port2 http://host3:8080/
Note that it returns a number of unopened host:port combinations.
So if it worked ok it returns standard 0
.
wait-for-them host1:port1 host2:port2 http://host3:8080/ -- cmd arg1 arg2
Note that if the ports are opened it returns the status code of cmd.
The main motivation of this program was to use it within docker-compose
config file (see docker-compose.yml
).
To support waiting for multiple hostname:port records in parallel.