File tree 7 files changed +60
-5
lines changed
7 files changed +60
-5
lines changed Original file line number Diff line number Diff line change 10
10
11
11
# Output of the go coverage tool, specifically when used with LiteIDE
12
12
* .out
13
- .idea
13
+
14
+ # IDE metadata
15
+ ** .idea /**
Original file line number Diff line number Diff line change
1
+ listen = 0.0.0.0:4222
2
+
3
+ authorization {
4
+ username = shijuvar
5
+ password = gopher
6
+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ import (
10
10
)
11
11
12
12
func main () {
13
- nc , err := nats .Connect ("nats://127.0.0.1:4222" )
13
+ nc , err := nats .Connect ("nats://127.0.0.1:4222" ,
14
+ nats .Name ("nats-demo" ), // optional NATS name
15
+ nats .UserInfo ("shijuvar" , "gopher" ),
16
+ )
14
17
if err != nil {
15
18
log .Fatalf ("Error: %s" , err )
16
19
}
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "log"
5
+ "runtime"
6
+
7
+ "github.com/nats-io/go-nats"
8
+ )
9
+
10
+ func main () {
11
+ nc , err := nats .Connect ("nats://127.0.0.1:4222" ,
12
+ nats .UserInfo ("shijuvar" , "gopher" ),
13
+ )
14
+ if err != nil {
15
+ log .Fatalf ("Error: %s" , err )
16
+ }
17
+ nc .QueueSubscribe ("order.created" , "worker-group" , func (m * nats.Msg ) {
18
+ log .Printf ("[Orer] %s" , string (m .Data ))
19
+ })
20
+ runtime .Goexit ()
21
+ }
Original file line number Diff line number Diff line change
1
+ package main
2
+
3
+ import (
4
+ "log"
5
+ "runtime"
6
+
7
+ "github.com/nats-io/go-nats"
8
+ )
9
+
10
+ func main () {
11
+ nc , err := nats .Connect ("nats://127.0.0.1:4222" ,
12
+ nats .UserInfo ("shijuvar" , "gopher" ),
13
+ )
14
+ if err != nil {
15
+ log .Fatalf ("Error: %s" , err )
16
+ }
17
+ nc .QueueSubscribe ("order.created" , "worker-group" , func (m * nats.Msg ) {
18
+ log .Printf ("[Orer] %s" , string (m .Data ))
19
+ })
20
+ runtime .Goexit ()
21
+ }
Original file line number Diff line number Diff line change 9
9
)
10
10
11
11
func main () {
12
- nc , err := nats .Connect ("nats://127.0.0.1:4222" )
12
+ nc , err := nats .Connect ("nats://127.0.0.1:4222" ,
13
+ nats .UserInfo ("shijuvar" , "gopher" ),
14
+ )
13
15
if err != nil {
14
16
log .Fatalf ("Error: %s" , err )
15
17
}
Original file line number Diff line number Diff line change 1
1
listen = 0.0.0.0:4222
2
2
3
3
authorization {
4
- username = hoge
5
- password = fuga
4
+ username = shijuvar
5
+ password = gopher
6
6
}
You can’t perform that action at this time.
0 commit comments