summaryrefslogtreecommitdiff
path: root/internal/config
AgeCommit message (Collapse)Author
2026-03-13task 399: add client session spec scaffoldingPaul Buetow
2026-03-10Refactor server-side config singleton readsPaul Buetow
2026-03-05more on thisPaul Buetow
2026-03-05Improve lint/vet reliability and refactor client runtime/bootstrapPaul Buetow
2026-03-03feat(config): add auth-key CLI and server cache settingsPaul Buetow
2026-03-03feat(server): add AUTHKEY command handlingPaul Buetow
2026-03-02handlers: use turbo EOF acknowledgement instead of sleep heuristicPaul Buetow
2026-03-02config: make server timing and buffer knobs configurablePaul Buetow
2026-03-02Refactor server path to use injected runtime config (task 329)Paul Buetow
2026-02-03Add SSH agent key selection and fix MapReduce outfile handlingPaul Buetow
This commit adds two major features and fixes: 1. SSH Agent Key Selection: - Add --agentKeyIndex flag to select specific SSH agent key (0-based) - Solves "too many authentication failures" with multiple SSH keys - Default -1 uses all keys (backwards compatible) - Available in dtail, dcat, dgrep, dmap commands 2. MapReduce Outfile Fixes: - CSV files now written at every interval, not just on exit - Proper signal handling (SIGTERM/SIGINT) with graceful shutdown - 5-second grace period for cleanup before force exit - Fixes issue where outfile remained as .tmp during execution Usage: dtail --servers host --agentKeyIndex 0 --query '...' outfile results.csv This is particularly useful with YubiKey/hardware tokens where many keys are loaded in the SSH agent, and for monitoring MapReduce results in real-time as they're computed. Co-authored-by: Cursor <cursoragent@cursor.com>
2026-01-29refactor: improve Go best practices compliancePaul Buetow
- Add explicit interface satisfaction checks (var _ Interface = (*Type)(nil)) for compile-time verification: - TurboWriter implementations (DirectTurboWriter, TurboChannelWriter) - Processor implementations (GrepLineProcessor, ChannellessLineProcessor) - Parser implementations (genericParser, csvParser, genericKVParser, custom parsers, mimecastParser) - Logger implementations (file, stdout) - Handler implementations (ServerHandler, ClientHandler) - Connector implementations (Serverless, ServerConnection) - SSH callback implementations (KnownHostsCallback) - Improve error handling with context wrapping (%w): - SSH operations: GeneratePrivateRSAKey, Agent - Query parsing: Query.parse - SSH client connections: dial, session, handle methods - Fix receiver consistency: - Convert Query.String() from value to pointer receiver - Convert Outfile.String() from value to pointer receiver - Convert all KnownHostsCallback methods to pointer receivers - Convert mapCommand.Start() to pointer receiver - Reorganize file structure for better clarity: - internal/io/dlog/dlog.go: Move type definition before public functions - internal/mapr/token.go: Reorganize helper functions after public ones - Add documentation comments: - Query.String() method - Outfile.String() method - Regex.String() method - Improve config variable documentation All unit tests and integration tests pass. Amp-Thread-ID: https://ampcode.com/threads/T-019c0b08-0eeb-705d-a1f7-31bb764b659a Co-authored-by: Amp <amp@ampcode.com>
2025-07-04refactor: change turbo boost to be enabled by defaultPaul Buetow
- Changed environment variable from DTAIL_TURBOBOOST_ENABLE to DTAIL_TURBOBOOST_DISABLE - Changed config field from TurboModeEnable to TurboBoostDisable - Turbo boost is now enabled by default and must be explicitly disabled - Updated all code references, documentation, and examples - No change in functionality, only inverted the boolean logic This makes turbo boost opt-out rather than opt-in, providing better default performance for large files while allowing users to disable it for scenarios where it adds overhead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-02feat: make turbo mode configurable via config filePaul Buetow
Add TurboModeEnable setting to server configuration with environment variable override. The DTAIL_TURBOBOOST_ENABLE environment variable takes precedence over config file setting. Turbo mode is automatically disabled for MapReduce operations to prevent data accuracy issues. - Add TurboModeEnable boolean to ServerConfig struct - Update config initializer to check environment variable for backward compatibility - Replace direct env var checks with config.Server.TurboModeEnable throughout codebase - Enable turbo mode in example config file (dtail.json.example) - Add property to JSON schema with descriptive documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-29fix: auto-override hostname to 'integrationtest' in integration test modePaul Buetow
- When DTAIL_INTEGRATION_TEST_RUN_MODE is set, hostname is automatically set to 'integrationtest' for consistent test behavior - Updated dcatcolors.expected to include trailing newline - All integration tests now pass without turbo mode enabled 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
2024-03-29lint warningsPaul Buetow
2023-06-21DTail: Restrict SSH MAC algorithms allowed - Update of few dependenciesPaul Buetow
2021-12-03add user permissions to JSON schemaPaul Buetow
2021-12-03reduce more code complexityPaul Buetow
2021-12-03reduxe function code complexityPaul Buetow
2021-11-07can set ssh private key path file via env varPaul Buetow
2021-11-06Remove insecure and dangerous relaxed auth modePaul Buetow
2021-11-03Add integration test for long line splitting - Also fixed a bug regarding ↵Paul Buetow
this along the way
2021-10-31rename spartan mode to plain modePaul Buetow
2021-10-29refactor integration test ssh_host_key configurationPaul Buetow
2021-10-29mergePaul Buetow
2021-10-29Dont use relaxed SSH Auth mode anymore for integration testsPaul Buetow
2021-10-27integration tests use separate ssh private key filePaul Buetow
2021-10-24Use different ssh host key file path for integration testsPaul Buetow
2021-10-24integration tests use a different known_hosts path and also dont read any ↵Paul Buetow
external config files
2021-10-24Fix DCat color test.Paul Buetow
2021-10-19Set DTAIL_RUN_INTEGRATIONT_TEST to yes for integration testsPaul Buetow
2021-10-19Can configure DTail client not to mess with ~/.ssh/known_hosts via env var - ↵Paul Buetow
this is useful for running unit and integration tests in jenkins
2021-10-15Execute test directories individuallyPaul Buetow
2021-10-14Merging grep context from masterPaul Buetow
2021-10-12Update JSON-schema to reflect all recent config file changes.Paul Buetow
2021-10-10add another dmap test - reading 100 source files at oncePaul Buetow
fix a data race when reading multiple files on one server from the same session at once
2021-10-10vetting and linting and some code restylingPaul Buetow
2021-10-10add dtail health check unit test.Paul Buetow
2021-10-09refactorPaul Buetow
2021-10-06move health check to separate client binaryPaul Buetow
2021-10-06enable faster shutdown - useful for dgrep/dmap and dcat commandsPaul Buetow
2021-10-05more on thisPaul Buetow
2021-10-03add dmap testsPaul Buetow
2021-10-02add dcat testPaul Buetow
2021-10-02reduce logging in serverless modePaul Buetow
2021-10-02Client default log dir is ~/logPaul Buetow
2021-10-02add more default fields to MAPREDUCEPaul Buetow
2021-10-02can have daily and normal file log rotationPaul Buetow
2021-10-02refactor config reader - also looks in additional search paths for config ↵Paul Buetow
file unless NONE is specified
2021-10-02move args to config packagePaul Buetow
logger package rewrite as dlog