File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,16 @@ package profile
4
4
import (
5
5
"os"
6
6
7
+ natslib "github.com/nats-io/nats.go"
7
8
"go-micro.dev/v5/broker"
8
9
"go-micro.dev/v5/broker/nats"
9
10
"go-micro.dev/v5/registry"
10
11
nreg "go-micro.dev/v5/registry/nats"
11
12
"go-micro.dev/v5/store"
13
+ nstore "go-micro.dev/v5/store/nats-js-kv"
12
14
13
15
"go-micro.dev/v5/transport"
16
+ ntx "go-micro.dev/v5/transport/nats"
14
17
)
15
18
16
19
type Profile struct {
@@ -34,8 +37,10 @@ func NatsProfile() Profile {
34
37
return Profile {
35
38
Registry : nreg .NewNatsRegistry (registry .Addrs (addr )),
36
39
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 })),
39
44
}
40
45
}
41
46
You can’t perform that action at this time.
0 commit comments