mirror of
https://github.com/ClusterCockpit/cc-metric-store.git
synced 2025-07-26 14:46:12 +02:00
Very basic initial API endpoint
This commit is contained in:
@@ -89,10 +89,10 @@ func ReceiveNats(address string, handleLine func(line *Line), done chan bool) er
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("NATS subscription to 'updates' on '%s' established\n", address)
|
||||
for {
|
||||
stop := <-done
|
||||
if stop {
|
||||
return nil
|
||||
}
|
||||
_ = <-done
|
||||
log.Println("NATS connection closed")
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user