Repository navigation
overhaul cli flag implementation - #230
Open
ChausseBenjamin wants to merge 2 commits into
Open
ChausseBenjamin wants to merge 2 commits into
ChausseBenjamin wants to merge 2 commits into
Conversation
The service now uses urfave/cli/v3 to parse cli flags. Every flag (for which it makes sense) can now be configure via either cli, environment variables, or a config `toml` file. Priority from most important to least important goes as follows: 1. direct cli flags 2. environment variables 3. config file 4. default values Just like the existing comments in the codebase outlined, the `--help` message and the `toml` config is split into groups: - PROXY protocol - Prometheus metrics - GeoIP - Healthcheck - Logging Since environment variables is generally the more idiomatic way of configuring docker-compose infrastructure, the example yaml files now use that syntax. An example `config.toml` file has also been provided in that same `examples/` directory. The change also deprecates a few flags (marking them as such but still accepting them for backwards compatibility): - `interval_ms` -> `interval` (which accept any *Duration* like `s`, `ms`, `min`, etc...) - `proxy_protocol_read_header_timeout_ms` -> `proxy_protocol_read_header_timeout` (also accepts any *Duration*) - `prometheus_clean_unseen_seconds` -> `prometheus_clean_unseen` (also accepts any *Duration*) - `enable_prometheus` -> `prometheus_enabled` (was already deprecated but uses scaffolding provided by *urfave/cli*)
ChausseBenjamin
marked this pull request as ready for review
September 27, 2026 00:31
Author
|
A few other things to note:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The service now uses urfave/cli/v3 to parse cli flags. Every flag (for which it makes sense) can now be configure via either cli, environment variables, or a config
tomlfile. Priority from most important to least important goes as follows:Just like the existing comments in the codebase outlined, the
--helpmessage and thetomlconfig is split into groups:Since environment variables is generally the more idiomatic way of configuring docker-compose infrastructure, the example yaml files now use that syntax. An example
config.tomlfile has also been provided in that sameexamples/directory.The change also deprecates a few flags (marking them as such but still accepting them for backwards compatibility):
interval_ms->interval(which accept any Duration likes,ms,min, etc...)proxy_protocol_read_header_timeout_ms->proxy_protocol_read_header_timeout(also accepts any Duration)prometheus_clean_unseen_seconds->prometheus_clean_unseen(also accepts any Duration)enable_prometheus->prometheus_enabled(was already deprecated but uses scaffolding provided by urfave/cli)