Closed gedw99 closed 1 month ago
You closed this without a PR @gedw99
I was not sure if you wanted it .
I asked in the initial issue for your opinion .
if you can give me your thoughts on it I can then work on it and make the PR.
You didn't say what you wanted the new signature to be so I was on standby.
I am fine with you to decide. The intent is so that Devs can tap into NATS with DataStar, where they have an Embedded, Leaf or NATS Cluster.
Datastar works either way. It's usage is completely orthogonal to this unless I'm missing something
Yes, but the issue is about using Data start with NATS its various forms. From what I see Toolblet only allows embedded.
Maybe you can use embeded as a NATS Leaf and then hook up NATS Cluster to the Embedded Leaf also ?
Setting up NATS to be used with Datastar means just using a *nats.Conn
and doesn't need anything special. Embedded is the special case and reason for its inclusion here.
I would like to change the function signature that is used to start the NATS embedded Server, so that the folder, that is used for storage, can be passed in and used.
That function is here: https://github.com/delaneyj/datastar/blob/main/backends/go/site/router.go#L146
Also this function is affected here: https://github.com/delaneyj/datastar/blob/main/backends/go/site/routes_home.go#L25
Also I would like to support using a NATS Cluster. I imagine that a separate Function call, is best for this ?
Then, in the Datastart repo, we can expose these changes so that everyone can have the flexibility to use it for their deployment options. In order to do that, we will probably need a PR in DataStar so that these options can be configured with environment variables also ?