starpc 0.38.0 → 0.38.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Makefile CHANGED
@@ -47,7 +47,7 @@ $(GOLANGCI_LINT):
47
47
  cd ./tools; \
48
48
  go build -v \
49
49
  -o ./bin/golangci-lint \
50
- github.com/golangci/golangci-lint/cmd/golangci-lint
50
+ github.com/golangci/golangci-lint/v2/cmd/golangci-lint
51
51
 
52
52
  $(GO_MOD_OUTDATED):
53
53
  cd ./tools; \
package/echo/echo.pb.go CHANGED
@@ -1,5 +1,5 @@
1
1
  // Code generated by protoc-gen-go-lite. DO NOT EDIT.
2
- // protoc-gen-go-lite version: v0.8.0
2
+ // protoc-gen-go-lite version: v0.9.1
3
3
  // source: github.com/aperturerobotics/starpc/echo/echo.proto
4
4
 
5
5
  package echo
package/echo/server.go CHANGED
@@ -22,8 +22,8 @@ func NewEchoServer(rpcStreamMux srpc.Mux) *EchoServer {
22
22
  }
23
23
 
24
24
  // Register registers the Echo server with the Mux.
25
- func (e *EchoServer) Register(mux srpc.Mux) error {
26
- return SRPCRegisterEchoer(mux, e)
25
+ func (s *EchoServer) Register(mux srpc.Mux) error {
26
+ return SRPCRegisterEchoer(mux, s)
27
27
  }
28
28
 
29
29
  // Echo implements echo.SRPCEchoerServer
@@ -79,17 +79,17 @@ func (s *EchoServer) EchoBidiStream(strm SRPCEchoer_EchoBidiStreamStream) error
79
79
  }
80
80
 
81
81
  // RpcStream runs a rpc stream
82
- func (r *EchoServer) RpcStream(stream SRPCEchoer_RpcStreamStream) error {
82
+ func (s *EchoServer) RpcStream(stream SRPCEchoer_RpcStreamStream) error {
83
83
  return rpcstream.HandleRpcStream(stream, func(ctx context.Context, componentID string) (srpc.Invoker, func(), error) {
84
- if r.rpcStreamMux == nil {
84
+ if s.rpcStreamMux == nil {
85
85
  return nil, nil, errors.New("not implemented")
86
86
  }
87
- return r.rpcStreamMux, nil, nil
87
+ return s.rpcStreamMux, nil, nil
88
88
  })
89
89
  }
90
90
 
91
91
  // DoNothing does nothing.
92
- func (r *EchoServer) DoNothing(ctx context.Context, empty *emptypb.Empty) (*emptypb.Empty, error) {
92
+ func (s *EchoServer) DoNothing(ctx context.Context, empty *emptypb.Empty) (*emptypb.Empty, error) {
93
93
  return &emptypb.Empty{}, nil
94
94
  }
95
95
 
package/go.mod CHANGED
@@ -13,7 +13,7 @@ replace (
13
13
  )
14
14
 
15
15
  require (
16
- github.com/aperturerobotics/protobuf-go-lite v0.9.0 // latest
16
+ github.com/aperturerobotics/protobuf-go-lite v0.9.1 // latest
17
17
  github.com/aperturerobotics/util v1.29.2 // latest
18
18
  )
19
19
 
package/go.sum CHANGED
@@ -2,8 +2,8 @@ github.com/aperturerobotics/go-libp2p v0.37.1-0.20241111002741-5cfbb50b74e0 h1:t
2
2
  github.com/aperturerobotics/go-libp2p v0.37.1-0.20241111002741-5cfbb50b74e0/go.mod h1:FJkAtQcP9XxqG1NNLNHKm+wLVIGSCQX2s6CEoD+w97g=
3
3
  github.com/aperturerobotics/json-iterator-lite v1.0.1-0.20240713111131-be6bf89c3008 h1:So9JeziaWKx2Fw8sK4AUN/szqKtJ0jEMhS6bU4sHbxs=
4
4
  github.com/aperturerobotics/json-iterator-lite v1.0.1-0.20240713111131-be6bf89c3008/go.mod h1:snaApCEDtrHHP6UWSLKiYNOZU9A5NyzccKenx9oZEzg=
5
- github.com/aperturerobotics/protobuf-go-lite v0.9.0 h1:zY3+qG0FPZiqhmEMQbVPW3wFLJ//aitvYy1zdgO8Hwo=
6
- github.com/aperturerobotics/protobuf-go-lite v0.9.0/go.mod h1:fULrxQxEBWKQm7vvju9AfjTp9yfHoLgwMQWTiZQ2tg0=
5
+ github.com/aperturerobotics/protobuf-go-lite v0.9.1 h1:P1knXKnwLJpVE8fmeXYGckKu79IhqUvKRdCfJNR0MwQ=
6
+ github.com/aperturerobotics/protobuf-go-lite v0.9.1/go.mod h1:fULrxQxEBWKQm7vvju9AfjTp9yfHoLgwMQWTiZQ2tg0=
7
7
  github.com/aperturerobotics/util v1.29.2 h1:4mF7PfltK2g9KuD5gYUx3zvfEQXA/7F/V6EIEwJA35Q=
8
8
  github.com/aperturerobotics/util v1.29.2/go.mod h1:wfEm6n6evCQCGu+NjR8qINo0feaPEgeXxDZK6/oSuk8=
9
9
  github.com/coder/websocket v1.8.13 h1:f3QZdXy7uGVz+4uCJy2nTZyM0yTBj8yANEHhqlXZ9FE=
package/mock/mock.pb.go CHANGED
@@ -1,5 +1,5 @@
1
1
  // Code generated by protoc-gen-go-lite. DO NOT EDIT.
2
- // protoc-gen-go-lite version: v0.8.0
2
+ // protoc-gen-go-lite version: v0.9.1
3
3
  // source: github.com/aperturerobotics/starpc/mock/mock.proto
4
4
 
5
5
  package e2e_mock
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "starpc",
3
- "version": "0.38.0",
3
+ "version": "0.38.1",
4
4
  "description": "Streaming protobuf RPC service protocol over any two-way channel.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1,5 +1,5 @@
1
1
  // Code generated by protoc-gen-go-lite. DO NOT EDIT.
2
- // protoc-gen-go-lite version: v0.8.0
2
+ // protoc-gen-go-lite version: v0.9.1
3
3
  // source: github.com/aperturerobotics/starpc/srpc/rpcproto.proto
4
4
 
5
5
  package srpc
@@ -43,7 +43,7 @@ func (s *StreamRwc) Read(p []byte) (n int, err error) {
43
43
  }
44
44
 
45
45
  s.readMsg.Clear()
46
- if err := s.Stream.MsgRecv(&s.readMsg); err != nil {
46
+ if err := s.MsgRecv(&s.readMsg); err != nil {
47
47
  return n, err
48
48
  }
49
49
  data := s.readMsg.GetData()
@@ -73,7 +73,7 @@ func (s *StreamRwc) Read(p []byte) (n int, err error) {
73
73
  // Write writes data to the stream.
74
74
  func (s *StreamRwc) Write(p []byte) (n int, err error) {
75
75
  s.writeMsg.SetData(p)
76
- err = s.Stream.MsgSend(&s.writeMsg)
76
+ err = s.MsgSend(&s.writeMsg)
77
77
  s.writeMsg.Clear()
78
78
  if err != nil {
79
79
  return 0, err