mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-26 21:19:43 +01:00
fix broken test, fix stack.yaml (#78)
This commit is contained in:
parent
3530c331f3
commit
a54d48542b
2 changed files with 7 additions and 3 deletions
|
@ -10,7 +10,9 @@ packages:
|
||||||
#- location:
|
#- location:
|
||||||
# git: git@github.mv.awakenetworks.net:awakenetworks/protobuf-wire.git
|
# git: git@github.mv.awakenetworks.net:awakenetworks/protobuf-wire.git
|
||||||
# commit: 2eda7a9e33e8a2f32c3ab8c4ace338b08fb79daa
|
# commit: 2eda7a9e33e8a2f32c3ab8c4ace338b08fb79daa
|
||||||
- location: '../protobuf-wire'
|
- location:
|
||||||
|
git: git@github.mv.awakenetworks.net:awakenetworks/protobuf-wire.git
|
||||||
|
commit: 927c61bbb1002a9278b8a7cbe3968be059f9ff30
|
||||||
extra-dep: true
|
extra-dep: true
|
||||||
- location:
|
- location:
|
||||||
git: git@github.com:awakenetworks/proto3-wire.git
|
git: git@github.com:awakenetworks/proto3-wire.git
|
||||||
|
|
|
@ -19,6 +19,7 @@ import Data.String
|
||||||
|
|
||||||
import Network.GRPC.LowLevel
|
import Network.GRPC.LowLevel
|
||||||
import Network.GRPC.HighLevel.Server
|
import Network.GRPC.HighLevel.Server
|
||||||
|
import Network.GRPC.HighLevel.Generated (defaultServiceOptions)
|
||||||
|
|
||||||
handleNormalCall :: ServerRequest 'Normal SimpleServiceRequest SimpleServiceResponse -> IO (ServerResponse 'Normal SimpleServiceResponse)
|
handleNormalCall :: ServerRequest 'Normal SimpleServiceRequest SimpleServiceResponse -> IO (ServerResponse 'Normal SimpleServiceResponse)
|
||||||
handleNormalCall (ServerNormalRequest meta (SimpleServiceRequest request nums)) =
|
handleNormalCall (ServerNormalRequest meta (SimpleServiceRequest request nums)) =
|
||||||
|
@ -62,11 +63,12 @@ handleDone exitVar (ServerNormalRequest _ req) =
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do exitVar <- newEmptyMVar
|
main = do exitVar <- newEmptyMVar
|
||||||
|
|
||||||
forkIO $ simpleServiceServer SimpleService
|
forkIO $ simpleServiceServer (SimpleService
|
||||||
{ simpleServiceDone = handleDone exitVar
|
{ simpleServiceDone = handleDone exitVar
|
||||||
, simpleServiceNormalCall = handleNormalCall
|
, simpleServiceNormalCall = handleNormalCall
|
||||||
, simpleServiceClientStreamingCall = handleClientStreamingCall
|
, simpleServiceClientStreamingCall = handleClientStreamingCall
|
||||||
, simpleServiceServerStreamingCall = handleServerStreamingCall
|
, simpleServiceServerStreamingCall = handleServerStreamingCall
|
||||||
, simpleServiceBiDiStreamingCall = handleBiDiStreamingCall }
|
, simpleServiceBiDiStreamingCall = handleBiDiStreamingCall })
|
||||||
|
defaultServiceOptions
|
||||||
|
|
||||||
takeMVar exitVar
|
takeMVar exitVar
|
||||||
|
|
Loading…
Reference in a new issue