Bug fixes in input and onramp. Hot config reload on signals. Added example utility scripts for signals.

This commit is contained in:
Kalzu Rekku
2026-01-17 14:47:13 +02:00
parent 7d7038d6bd
commit aa216981d2
16 changed files with 2339 additions and 306 deletions

View File

@@ -211,9 +211,19 @@ func (a *Aggregator) serve(host string, port int) {
var response interface{}
a.mu.RLock()
if cmd == "live" {
// Deep copy the cache
cacheCopy := make(map[string]map[int64]*Candle)
for tf, candles := range a.cache {
cacheCopy[tf] = make(map[int64]*Candle)
for ts, candle := range candles {
// Copy the candle struct
candleCopy := *candle
cacheCopy[tf][ts] = &candleCopy
}
}
response = map[string]interface{}{
"type": "live_candles",
"data": a.cache,
"data": cacheCopy,
}
} else {
response = map[string]interface{}{