feat: create the first version of logtap cli - #12
Merged
Merged
Conversation
Multi-stage build (rust:slim -> debian:slim, non-root user), relying on reqwest's bundled webpki-roots so no ca-certificates package is needed at runtime. Also tunes the release profile (strip, thin LTO) since the resulting binary size now matters for image size.
README's Getting started still described a library-only workflow with no CLI binary, which is out of date now that main.rs and the Dockerfile exist. Replaces it with the actual build/run steps, exit codes, Docker usage, and the full current config field reference (retry/backoff, mask_common_patterns, dead-letter rotation). Also documents the manual dead-letter replay recipe and checks off the roadmap items that are now actually done. Fills in the previously-empty root logtap.toml with a working example.
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.
This pull request introduces a new CLI interface for the
logtapapplication, enabling users to specify a configuration file via command-line arguments. It also adds an integration test to ensure the CLI wiring works end-to-end. The most important changes are:CLI Interface Implementation:
clapdependency toCargo.tomlfor command-line argument parsing.mainfunction insrc/main.rsthat usesclapto parse a--config-pathargument, loads the specified config file, and runs the application.Testing and Validation:
tests/cli_test.rsthat spawns the compiledlogtapbinary as a subprocess, verifies that it reads the config file, and checks that a log line is delivered to a mock HTTP server. This ensures the CLI entry point works as expected.