summaryrefslogtreecommitdiff
path: root/internal/config/initializer.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-02 22:28:05 +0300
committerPaul Buetow <paul@buetow.org>2025-07-02 22:28:05 +0300
commita4eb3cc769c13312fdd4b7aaa20659e408f734b7 (patch)
treee80d3da40af872f43e7698c13fd339286dfd2391 /internal/config/initializer.go
parent17ee5e62c2b1037c21cb36f2677d2c538e2542cb (diff)
feat: make turbo mode configurable via config file
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>
Diffstat (limited to 'internal/config/initializer.go')
-rw-r--r--internal/config/initializer.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/config/initializer.go b/internal/config/initializer.go
index 9c3bf64..e750a1a 100644
--- a/internal/config/initializer.go
+++ b/internal/config/initializer.go
@@ -92,6 +92,11 @@ func (in *initializer) processEnvVars(args *Args) {
if len(sshPrivateKeyPathFile) > 0 && args.SSHPrivateKeyFilePath == "" {
args.SSHPrivateKeyFilePath = sshPrivateKeyPathFile
}
+ // Check if turbo mode should be enabled from environment variable
+ // This allows backward compatibility with existing scripts
+ if Env("DTAIL_TURBOBOOST_ENABLE") {
+ in.Server.TurboModeEnable = true
+ }
}
func (in *initializer) setupConfig(sourceCb transformCb, args *Args,