diff options
Diffstat (limited to 'internal/server/handlers/readcommand_server.go')
| -rw-r--r-- | internal/server/handlers/readcommand_server.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/server/handlers/readcommand_server.go b/internal/server/handlers/readcommand_server.go index 46f61a4..2c0a616 100644 --- a/internal/server/handlers/readcommand_server.go +++ b/internal/server/handlers/readcommand_server.go @@ -33,6 +33,8 @@ type readCommandServer interface { FlushTurboData() SignalTurboEOF() GetTurboChannel() chan []byte + TurboChannelLen() int + WaitForTurboEOFAck(timeout time.Duration) bool ReadGlobRetryInterval() time.Duration ReadRetryInterval() time.Duration AggregateLinesChannelBufferSize() int @@ -40,6 +42,7 @@ type readCommandServer interface { TurboEOFWaitDuration(fileCount int) time.Duration ShutdownTurboSerializeWait() time.Duration ShutdownIdleRecheckWait() time.Duration + TurboEOFAckTimeout() time.Duration } var _ readCommandServer = (*ServerHandler)(nil) @@ -126,6 +129,10 @@ func (h *ServerHandler) FlushTurboData() { h.flushTurboData() } +func (h *ServerHandler) TurboEOFAckTimeout() time.Duration { + return durationFromMilliseconds(h.serverCfg.TurboEOFAckTimeoutMs, 2*time.Second) +} + func durationFromMilliseconds(value int, fallback time.Duration) time.Duration { if value <= 0 { return fallback |
