Closed gedw99 closed 3 months ago
@gedw99 currently the only way it is running is using an embedded NATS server with Jetstream enabled.
You can look at the code for the horizon
main function, it is not very long and does no flag parsing :)
https://github.com/verifa/horizon/blob/main/cmd/horizon/horizon.go
If you want to try using an existing NATS server you could write your own main
function and use the WithNATSConn()
option in server
: https://github.com/verifa/horizon/blob/main/pkg/server/server.go#L39
I didn't feel like writing a complex CLI with lots of argument/config handling at this time when it is arguably easier for people to write their own main
function for their specific needs.
Thanks but the embedded nats server is failing. Could you have a look ?
I would then be able to extend it to work with a nats cluster as a PR
Sorry for the late reply, I just came back from holidays. I tested with a fresh clone of the repository and it works for me. Which OS are you running on? Could you try extending the timeout to see if that works (it is currently hardcoded)?
https://github.com/verifa/horizon/blob/main/pkg/natsutil/server.go#L155
I did a git pull and make and it works now.
not sure why :)
I wil close, but feel free to open if you need to.
Hope you had a good holiday :)
Hey @jlarfors
Just had some more time to spend on this.
Getting stuck with NATS startup. Its trying to startup an embedded NATS Jetstream Server by default ?
I was wanting to point it to a NATS Cluster to try out some things.
I am latest main version btw...