Skip to content

Commit e9d596b

Browse files
authored
Merge pull request #1 from rsocket/feature/usechannels
Feature/usechannels
2 parents 7a74f98 + 744e685 commit e9d596b

File tree

5 files changed

+483
-13
lines changed

5 files changed

+483
-13
lines changed

.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@ env:
99
install:
1010
- curl -L https://github.com/google/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip -o /tmp/protoc.zip
1111
- unzip /tmp/protoc.zip -d "$HOME"/protoc
12-
- go get -u golang.org/x/lint/golint
13-
- go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
14-
- go get -u github.com/rsocket/rsocket-rpc-go/protoc-gen-go
1512

1613
script:
14+
- make
1715
- $HOME/protoc/bin/protoc -I examples/ping-pong/ examples/ping-pong/ping-pong.proto --go_out=plugins=rrpc:./examples/ping-pong
18-
- go test -v ./...
16+
- make test

client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ import (
99
"github.com/rsocket/rsocket-go/rx/mono"
1010
)
1111

12+
// ClientConn struct
1213
type ClientConn struct {
1314
rSocket rsocket.RSocket
1415
meterRegistry MeterRegistry
1516
tracer Tracer
1617
}
1718

19+
// InvokeRequestResponse invoke request response
1820
func (p *ClientConn) InvokeRequestResponse(
1921
ctx context.Context,
2022
srv string,
@@ -43,6 +45,7 @@ func (p *ClientConn) InvokeRequestResponse(
4345
return mono.ToChannel(m, ctx)
4446
}
4547

48+
// InvokeRequestStream invoke request stream
4649
func (p *ClientConn) InvokeRequestStream(
4750
ctx context.Context,
4851
srv string,
@@ -69,6 +72,7 @@ func (p *ClientConn) InvokeRequestStream(
6972
return flux.ToChannel(p.rSocket.RequestStream(sent), ctx)
7073
}
7174

75+
// NewClientConn creates new client
7276
func NewClientConn(c rsocket.RSocket, m MeterRegistry, t Tracer) *ClientConn {
7377
return &ClientConn{
7478
rSocket: c,

examples/ping-pong/ping-pong_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestAllInOne(t *testing.T) {
2424

2525
m := map[string]string{
2626
"tcp": "tcp://127.0.0.1:7878",
27-
"websocket": "ws://127.0.0.1:7878",
27+
//"websocket": "ws://127.0.0.1:7878",
2828
}
2929
for k, v := range m {
3030
t.Run(k, func(t *testing.T) {

go.mod

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,9 @@ go 1.12
44

55
require (
66
github.com/golang/protobuf v1.3.2
7-
github.com/hoisie/mustache v0.0.0-20120318181656-6dfe7cd5e765
8-
github.com/jjeffcaii/reactor-go v0.0.12
7+
github.com/jjeffcaii/reactor-go v0.0.16
98
github.com/opentracing/opentracing-go v1.1.0
109
github.com/pkg/errors v0.8.1
11-
github.com/rsocket/rsocket-go v0.0.0-00010101000000-000000000000
12-
github.com/stretchr/objx v0.2.0 // indirect
10+
github.com/rsocket/rsocket-go v0.3.2
1311
github.com/stretchr/testify v1.3.0
1412
)
15-
16-
replace github.com/rsocket/rsocket-go => ../rsocket-go
17-
18-
replace github.com/panjf2000/ants => ../ants

0 commit comments

Comments
 (0)