Skip to content

Support file as config for multiple Waitables #3

@LeoBorai

Description

@LeoBorai

Some use cases may require waiting for multiple resources of different kinds to be available
before exiting.

Theres 2 ways to approach this:

  1. 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.
  2. 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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions