File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
examples/helloworld_streams/lib/helloworld_streams Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ defmodule HelloworldStreams.Server do
12
12
13
13
@ spec say_unary_hello ( HelloRequest . t ( ) , GRPC.Server.Stream . t ( ) ) :: any ( )
14
14
def say_unary_hello ( request , _materializer ) do
15
- GRPCStream . single ( request )
15
+ GRPCStream . unary ( request )
16
16
|> GRPCStream . ask ( Transformer )
17
17
|> GRPCStream . map ( fn % HelloReply { } = reply ->
18
18
% HelloReply { message: "[Reply] #{ reply . message } " }
@@ -22,7 +22,7 @@ defmodule HelloworldStreams.Server do
22
22
23
23
@ spec say_server_hello ( HelloRequest . t ( ) , GRPC.Server.Stream . t ( ) ) :: any ( )
24
24
def say_server_hello ( request , materializer ) do
25
- GRPCStream . single ( request , propagate_context: true , materializer: materializer )
25
+ GRPCStream . unary ( request , propagate_context: true , materializer: materializer )
26
26
# Create new output stream from the request and drop the input
27
27
|> GRPCStream . via ( fn _metadata , % HelloRequest { } = msg ->
28
28
create_output_stream ( msg )
Original file line number Diff line number Diff line change @@ -115,8 +115,8 @@ defmodule GRPC.Stream do
115
115
116
116
flow = GRPCStream.single(request, max_demand: 5)
117
117
"""
118
- @ spec single ( any ( ) , Keyword . t ( ) ) :: t ( )
119
- def single ( input , opts \\ [ ] ) when is_struct ( input ) ,
118
+ @ spec unary ( any ( ) , Keyword . t ( ) ) :: t ( )
119
+ def unary ( input , opts \\ [ ] ) when is_struct ( input ) ,
120
120
do: build_grpc_stream ( [ input ] , Keyword . merge ( opts , unary: true ) )
121
121
122
122
@ doc """
You can’t perform that action at this time.
0 commit comments