mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-14 23:29:42 +01:00
update to work with latest grpc
This commit is contained in:
parent
17303329fb
commit
20693583d9
3 changed files with 24 additions and 26 deletions
|
@ -1,11 +1,13 @@
|
|||
#include <grpc/grpc.h>
|
||||
|
||||
grpc_event *grpc_completion_queue_next_(grpc_completion_queue *cq, gpr_timespec *deadline) {
|
||||
grpc_completion_queue_next(cq, *deadline);
|
||||
grpc_event grpc_completion_queue_next_(grpc_completion_queue *cq,
|
||||
gpr_timespec *deadline,
|
||||
void *reserved) {
|
||||
return grpc_completion_queue_next(cq, *deadline, reserved);
|
||||
}
|
||||
|
||||
grpc_event* grpc_completion_queue_pluck_(grpc_completion_queue *cq, void *tag, gpr_timespec *deadline) {
|
||||
grpc_completion_queue_pluck(cq, tag, *deadline);
|
||||
grpc_event grpc_completion_queue_pluck_(grpc_completion_queue *cq, void *tag,
|
||||
gpr_timespec *deadline,
|
||||
void *reserved) {
|
||||
return grpc_completion_queue_pluck(cq, tag, *deadline, reserved);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
name: grpc-haskell
|
||||
version: 0.0.0.0
|
||||
synopsis: Haskell implementation of gRPC layered on shared C library.
|
||||
-- description:
|
||||
-- description:
|
||||
homepage: http://github.com/aloiscochard/grpc-haskell
|
||||
license: Apache-2.0
|
||||
license-file: LICENSE
|
||||
|
@ -14,18 +14,18 @@ cabal-version: >=1.10
|
|||
extra-source-files: cbits, include
|
||||
|
||||
library
|
||||
build-depends:
|
||||
base >=4.7 && <4.8
|
||||
, clock >=0.4 && <0.5
|
||||
c-sources:
|
||||
build-depends:
|
||||
base
|
||||
, clock
|
||||
c-sources:
|
||||
cbits/grpc_haskell.c
|
||||
exposed-modules:
|
||||
Network.GRPC.Core
|
||||
Network.GRPC.Core.Constants
|
||||
Network.GRPC.Core.Time
|
||||
extra-libraries:
|
||||
extra-libraries:
|
||||
grpc
|
||||
includes:
|
||||
includes:
|
||||
include/grpc_haskell.h
|
||||
, grpc/grpc.h
|
||||
, grpc/status.h
|
||||
|
@ -37,9 +37,9 @@ library
|
|||
hs-source-dirs: src
|
||||
|
||||
test-suite test
|
||||
build-depends:
|
||||
build-depends:
|
||||
base
|
||||
, QuickCheck >= 2.7 && < 2.8
|
||||
, QuickCheck
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -fwarn-incomplete-patterns -O2 -threaded -rtsopts
|
||||
hs-source-dirs: tests
|
||||
|
|
|
@ -34,7 +34,6 @@ data Arg = Arg { argKey :: String, argValue :: ArgValue }
|
|||
data ArgValue = ArgString String | ArgInt Int
|
||||
|
||||
{#enum grpc_call_error as CallError {underscoreToCase} deriving (Eq)#}
|
||||
{#enum grpc_op_error as OpError {underscoreToCase} deriving (Eq)#}
|
||||
|
||||
{#pointer *grpc_byte_buffer as ByteBuffer newtype #}
|
||||
{#pointer *grpc_byte_buffer_reader as ByteBufferReader newtype #}
|
||||
|
@ -45,24 +44,21 @@ data ArgValue = ArgString String | ArgInt Int
|
|||
{#pointer *grpc_op as Op newtype #}
|
||||
|
||||
{#fun grpc_init as ^ {} -> `()'#}
|
||||
{#fun grpc_shutdown as ^ {} -> `()'#}
|
||||
{#fun grpc_shutdown as ^ {} -> `()'#}
|
||||
|
||||
{#fun grpc_completion_queue_create as ^ {} -> `CompletionQueue'#}
|
||||
{#fun grpc_completion_queue_create as ^ {`Ptr ()'} -> `CompletionQueue'#}
|
||||
|
||||
{#fun grpc_completion_queue_next_ as ^ {`CompletionQueue', `CTimeSpecPtr'} -> `Event'#}
|
||||
{#fun grpc_completion_queue_pluck_ as ^ {`CompletionQueue', `Ptr ()'} -> `Event'#}
|
||||
|
||||
{#fun grpc_event_finish as ^ {`Event'} -> `()'#}
|
||||
{#fun grpc_completion_queue_pluck_ as ^ {`CompletionQueue', `Ptr ()', `CTimeSpecPtr'} -> `Event'#}
|
||||
|
||||
{#fun grpc_completion_queue_shutdown as ^ {`CompletionQueue'} -> `()'#}
|
||||
{#fun grpc_completion_queue_destroy as ^ {`CompletionQueue'} -> `()'#}
|
||||
|
||||
{#fun grpc_channel_create_call_ as ^ {`Channel', `CompletionQueue', `String', `String', `CTimeSpecPtr'} -> `Call'#}
|
||||
{#fun grpc_channel_create as ^ {`String', `ChannelArgsPtr'} -> `Channel'#}
|
||||
{#fun grpc_insecure_channel_create as ^ {`String', `ChannelArgsPtr', `Ptr ()'} -> `Channel'#}
|
||||
{#fun grpc_channel_destroy as ^ {`Channel'} -> `()'#}
|
||||
|
||||
{#fun grpc_call_start_batch as ^ {`Call', `Op', `Int', `Ptr ()'} -> `CallError'#}
|
||||
{#fun grpc_call_cancel as ^ {`Call'} -> `()'#}
|
||||
{#fun grpc_call_cancel_with_status as ^ {`Call', `StatusCode', `String'} -> `()'#}
|
||||
{#fun grpc_call_start_batch as ^ {`Call', `Op', `Int', `Ptr ()', `Ptr ()'} -> `CallError'#}
|
||||
{#fun grpc_call_cancel as ^ {`Call', `Ptr ()'} -> `()'#}
|
||||
{#fun grpc_call_cancel_with_status as ^ {`Call', `StatusCode', `String', `Ptr ()'} -> `()'#}
|
||||
{#fun grpc_call_destroy as ^ {`Call'} -> `()'#}
|
||||
|
||||
|
|
Loading…
Reference in a new issue