File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,13 +4,16 @@ package profile
44import (
55 "os"
66
7+ natslib "github.com/nats-io/nats.go"
78 "go-micro.dev/v5/broker"
89 "go-micro.dev/v5/broker/nats"
910 "go-micro.dev/v5/registry"
1011 nreg "go-micro.dev/v5/registry/nats"
1112 "go-micro.dev/v5/store"
13+ nstore "go-micro.dev/v5/store/nats-js-kv"
1214
1315 "go-micro.dev/v5/transport"
16+ ntx "go-micro.dev/v5/transport/nats"
1417)
1518
1619type Profile struct {
@@ -34,8 +37,10 @@ func NatsProfile() Profile {
3437 return Profile {
3538 Registry : nreg .NewNatsRegistry (registry .Addrs (addr )),
3639 Broker : nats .NewNatsBroker (broker .Addrs (addr )),
37- Store : store .NewFileStore (), // nats-backed store when available
38- Transport : transport .NewHTTPTransport (), // nats transport when available
40+ // this might be wrong, look for a better way to set this up
41+ Store : nstore .NewStore (nstore .NatsOptions (natslib.Options {Url : addr })),
42+ // same, double check for single url vs slice of Server
43+ Transport : ntx .NewTransport (ntx .Options (natslib.Options {Url : addr })),
3944 }
4045}
4146
You can’t perform that action at this time.
0 commit comments