-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Some use cases may require waiting for multiple resources of different kinds to be available
before exiting.
Theres 2 ways to approach this:
- Use subcommand chaining, so a one liner could be written allowing to specify multiple resources. This relies on Command Chaining which is not yet supported in Clap.
- Use a file (e.g. Configuration File), where multiple resources are specified
File Specs
A nice format (as well as familiar) in the Rust ecosystem is TOML. Based on the assumption of
such format as input, the following spec could be of help to determine how the file is structured.
# Top-Level Definitions for the process
name = "Wain on Docker Services"
timeout = "120s"
[resources.tcp.server]
host = "127.0.0.1"
port = 7878
uri = "/healthcheck"
exit_on_http_status = 200
[resources.tcp.api_gateway]
host = "127.0.0.1"
port = 80
exit_on_http_status = 200
inteval = "2s"
[resources.file.logs]
path = "server.log"
exit_on_size = "5MB"Metadata
Metadata
Assignees
Labels
No labels