starpc 0.35.5 → 0.36.0
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/echo/echo_srpc.pb.go +13 -0
- package/go.mod +1 -1
- package/mock/mock_srpc.pb.go +3 -0
- package/package.json +1 -1
package/echo/echo_srpc.pb.go
CHANGED
|
@@ -13,13 +13,20 @@ import (
|
|
|
13
13
|
)
|
|
14
14
|
|
|
15
15
|
type SRPCEchoerClient interface {
|
|
16
|
+
// SRPCClient returns the underlying SRPC client.
|
|
16
17
|
SRPCClient() srpc.Client
|
|
17
18
|
|
|
19
|
+
// Echo returns the given message.
|
|
18
20
|
Echo(ctx context.Context, in *EchoMsg) (*EchoMsg, error)
|
|
21
|
+
// EchoServerStream is an example of a server -> client one-way stream.
|
|
19
22
|
EchoServerStream(ctx context.Context, in *EchoMsg) (SRPCEchoer_EchoServerStreamClient, error)
|
|
23
|
+
// EchoClientStream is an example of client->server one-way stream.
|
|
20
24
|
EchoClientStream(ctx context.Context) (SRPCEchoer_EchoClientStreamClient, error)
|
|
25
|
+
// EchoBidiStream is an example of a two-way stream.
|
|
21
26
|
EchoBidiStream(ctx context.Context) (SRPCEchoer_EchoBidiStreamClient, error)
|
|
27
|
+
// RpcStream opens a nested rpc call stream.
|
|
22
28
|
RpcStream(ctx context.Context) (SRPCEchoer_RpcStreamClient, error)
|
|
29
|
+
// DoNothing does nothing.
|
|
23
30
|
DoNothing(ctx context.Context, in *emptypb.Empty) (*emptypb.Empty, error)
|
|
24
31
|
}
|
|
25
32
|
|
|
@@ -216,11 +223,17 @@ func (c *srpcEchoerClient) DoNothing(ctx context.Context, in *emptypb.Empty) (*e
|
|
|
216
223
|
}
|
|
217
224
|
|
|
218
225
|
type SRPCEchoerServer interface {
|
|
226
|
+
// Echo returns the given message.
|
|
219
227
|
Echo(context.Context, *EchoMsg) (*EchoMsg, error)
|
|
228
|
+
// EchoServerStream is an example of a server -> client one-way stream.
|
|
220
229
|
EchoServerStream(*EchoMsg, SRPCEchoer_EchoServerStreamStream) error
|
|
230
|
+
// EchoClientStream is an example of client->server one-way stream.
|
|
221
231
|
EchoClientStream(SRPCEchoer_EchoClientStreamStream) (*EchoMsg, error)
|
|
232
|
+
// EchoBidiStream is an example of a two-way stream.
|
|
222
233
|
EchoBidiStream(SRPCEchoer_EchoBidiStreamStream) error
|
|
234
|
+
// RpcStream opens a nested rpc call stream.
|
|
223
235
|
RpcStream(SRPCEchoer_RpcStreamStream) error
|
|
236
|
+
// DoNothing does nothing.
|
|
224
237
|
DoNothing(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
|
|
225
238
|
}
|
|
226
239
|
|
package/go.mod
CHANGED
package/mock/mock_srpc.pb.go
CHANGED
|
@@ -11,8 +11,10 @@ import (
|
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
type SRPCMockClient interface {
|
|
14
|
+
// SRPCClient returns the underlying SRPC client.
|
|
14
15
|
SRPCClient() srpc.Client
|
|
15
16
|
|
|
17
|
+
// MockRequest runs a mock unary request.
|
|
16
18
|
MockRequest(ctx context.Context, in *MockMsg) (*MockMsg, error)
|
|
17
19
|
}
|
|
18
20
|
|
|
@@ -44,6 +46,7 @@ func (c *srpcMockClient) MockRequest(ctx context.Context, in *MockMsg) (*MockMsg
|
|
|
44
46
|
}
|
|
45
47
|
|
|
46
48
|
type SRPCMockServer interface {
|
|
49
|
+
// MockRequest runs a mock unary request.
|
|
47
50
|
MockRequest(context.Context, *MockMsg) (*MockMsg, error)
|
|
48
51
|
}
|
|
49
52
|
|