Very basic initial API endpoint

This commit is contained in:
Lou Knauer
2021-08-20 12:54:11 +02:00
parent fb433cc497
commit f7310bc70a
6 changed files with 126 additions and 5 deletions

View File

@@ -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
}
}