hot reload

This commit is contained in:
2025-11-02 11:36:37 +01:00
parent 8003bc4a77
commit d8542a10e6
7 changed files with 366 additions and 231 deletions

View File

@@ -107,6 +107,13 @@ func (c *TCPClient) setDefaultParams() {
}
}
func (c *TCPClient) ReloadFilters() {
if c.LoggedIn {
Log.Info("Reloading cluster filters...")
c.SetFilters()
}
}
func (c *TCPClient) calculateBackoff() time.Duration {
// Formule: min(baseDelay * 2^attempts, maxDelay)
delay := time.Duration(float64(c.baseReconnectDelay) * math.Pow(2, float64(c.reconnectAttempts)))