diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-02 10:29:24 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-02 10:29:24 +0200 |
| commit | 29e50d7b6ebb9e6c59d079ef5b7551b1acd950fb (patch) | |
| tree | 147ae88ee00c6b170d1f28a55c89fb4c92fc440f /internal/config | |
| parent | 8c08e4e60219782e50c3a5f20a051e706196f48c (diff) | |
config: make server timing and buffer knobs configurable
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/common.go | 3 | ||||
| -rw-r--r-- | internal/config/server.go | 41 |
2 files changed, 43 insertions, 1 deletions
diff --git a/internal/config/common.go b/internal/config/common.go index 7a72cfe..4e90f7e 100644 --- a/internal/config/common.go +++ b/internal/config/common.go @@ -4,6 +4,8 @@ package config type CommonConfig struct { // The SSH port number SSHPort int + // SSH connection timeout in milliseconds. + SSHConnectTimeoutMs int `json:",omitempty"` // Enable experimental features (mainly for dev purposes) ExperimentalFeaturesEnable bool `json:",omitempty"` // LogDir defines the log directory. @@ -22,6 +24,7 @@ type CommonConfig struct { func newDefaultCommonConfig() *CommonConfig { return &CommonConfig{ SSHPort: DefaultSSHPort, + SSHConnectTimeoutMs: 2000, ExperimentalFeaturesEnable: false, LogDir: "log", Logger: "stdout", diff --git a/internal/config/server.go b/internal/config/server.go index efa7335..6d25965 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -72,6 +72,32 @@ type ServerConfig struct { // better performance through direct writing that bypasses internal channels. // Set this to true only if you experience issues with turbo boost mode. TurboBoostDisable bool `json:",omitempty"` + // Retry interval for glob retries in milliseconds. + ReadGlobRetryIntervalMs int `json:",omitempty"` + // Retry interval for re-reading in tail/cat loops in milliseconds. + ReadRetryIntervalMs int `json:",omitempty"` + // Buffer size used for aggregate read channels. + ReadAggregateLineBufferSize int `json:",omitempty"` + // Delay after turbo processor flush/close to allow data transmission, in milliseconds. + TurboTransmissionDelayMs int `json:",omitempty"` + // Turbo EOF wait base duration in milliseconds. + TurboEOFWaitBaseMs int `json:",omitempty"` + // Turbo EOF wait per-file duration in milliseconds. + TurboEOFWaitPerFileMs int `json:",omitempty"` + // Maximum turbo EOF wait duration in milliseconds. + TurboEOFWaitMaxMs int `json:",omitempty"` + // Turbo channel buffer size. + TurboChannelBufferSize int `json:",omitempty"` + // Turbo channel flush timeout in milliseconds. + TurboFlushTimeoutMs int `json:",omitempty"` + // Turbo channel flush poll interval in milliseconds. + TurboFlushPollIntervalMs int `json:",omitempty"` + // Turbo read retry interval in milliseconds when data is expected but not yet available. + TurboReadRetryIntervalMs int `json:",omitempty"` + // Wait for turbo aggregate serialization during shutdown in milliseconds. + ShutdownTurboSerializeWaitMs int `json:",omitempty"` + // Final idle recheck wait before shutdown in milliseconds. + ShutdownIdleRecheckWaitMs int `json:",omitempty"` } // Create a new default server configuration. @@ -90,7 +116,20 @@ func newDefaultServerConfig() *ServerConfig { Permissions: Permissions{ Default: defaultPermissions, }, - TurboBoostDisable: false, // Default to false, meaning turbo boost is enabled by default + TurboBoostDisable: false, // Default to false, meaning turbo boost is enabled by default + ReadGlobRetryIntervalMs: 5000, + ReadRetryIntervalMs: 2000, + ReadAggregateLineBufferSize: 10000, + TurboTransmissionDelayMs: 50, + TurboEOFWaitBaseMs: 500, + TurboEOFWaitPerFileMs: 10, + TurboEOFWaitMaxMs: 2000, + TurboChannelBufferSize: 1000, + TurboFlushTimeoutMs: 2000, + TurboFlushPollIntervalMs: 10, + TurboReadRetryIntervalMs: 1, + ShutdownTurboSerializeWaitMs: 500, + ShutdownIdleRecheckWaitMs: 10, } } |
