mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-26 21:19:43 +01:00
Add a comment to ClientReaderRequest. (#55)
It was not obvious from the type how many times the final field of ClientReaderRequest would be invoked. (Assuming it is invoked once per stream increment results in a hang, which can be confusing.)
This commit is contained in:
parent
2cfca15c31
commit
3ee4dabc2d
1 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,9 @@ data ClientRequest (streamType :: GRPCMethodType) request response where
|
||||||
ClientNormalRequest :: request -> TimeoutSeconds -> MetadataMap -> ClientRequest 'Normal request response
|
ClientNormalRequest :: request -> TimeoutSeconds -> MetadataMap -> ClientRequest 'Normal request response
|
||||||
ClientWriterRequest :: TimeoutSeconds -> MetadataMap -> (StreamSend request -> IO ()) -> ClientRequest 'ClientStreaming request response
|
ClientWriterRequest :: TimeoutSeconds -> MetadataMap -> (StreamSend request -> IO ()) -> ClientRequest 'ClientStreaming request response
|
||||||
ClientReaderRequest :: request -> TimeoutSeconds -> MetadataMap -> (MetadataMap -> StreamRecv response -> IO ()) -> ClientRequest 'ServerStreaming request response
|
ClientReaderRequest :: request -> TimeoutSeconds -> MetadataMap -> (MetadataMap -> StreamRecv response -> IO ()) -> ClientRequest 'ServerStreaming request response
|
||||||
|
-- ^ The final field will be invoked once, and it should repeatedly
|
||||||
|
-- invoke its final argument (of type @(StreamRecv response)@)
|
||||||
|
-- in order to obtain the streaming response incrementally.
|
||||||
ClientBiDiRequest :: TimeoutSeconds -> MetadataMap -> (MetadataMap -> StreamRecv response -> StreamSend request -> WritesDone -> IO ()) -> ClientRequest 'BiDiStreaming request response
|
ClientBiDiRequest :: TimeoutSeconds -> MetadataMap -> (MetadataMap -> StreamRecv response -> StreamSend request -> WritesDone -> IO ()) -> ClientRequest 'BiDiStreaming request response
|
||||||
|
|
||||||
data ClientResult (streamType :: GRPCMethodType) response where
|
data ClientResult (streamType :: GRPCMethodType) response where
|
||||||
|
|
Loading…
Reference in a new issue