Safe Haskell | None |
---|---|
Language | Haskell2010 |
For further information over initialization of the connection, consult the http2-client-grpc docs.
Synopsis
- data GrpcClient
- data GrpcClientConfig
- grpcClientConfigSimple :: HostName -> PortNumber -> UseTlsOrNot -> GrpcClientConfig
- setupGrpcClient' :: GrpcClientConfig -> IO (Either ClientError GrpcClient)
- buildService :: forall (pro :: GRpcMessageProtocol) (s :: Service') (p :: Symbol) t (nm :: Symbol) (anns :: [ServiceAnnotation]) (ms :: [Method Symbol]). (s ~ 'Service nm anns ms, Generic t, BuildService pro s p ms (Rep t)) => GrpcClient -> t
- data GRpcMessageProtocol
- data CompressMode
- data GRpcReply a
- generateRecordFromService :: String -> String -> Namer -> Name -> Q [Dec]
Initialization of the gRPC client
data GrpcClient #
A simplified gRPC Client connected via an HTTP2Client to a given server. Each call from one client will share similar headers, timeout, compression.
data GrpcClientConfig #
Configuration to setup a GrpcClient.
grpcClientConfigSimple :: HostName -> PortNumber -> UseTlsOrNot -> GrpcClientConfig #
Fill and generate the Haskell record of functions
buildService :: forall (pro :: GRpcMessageProtocol) (s :: Service') (p :: Symbol) t (nm :: Symbol) (anns :: [ServiceAnnotation]) (ms :: [Method Symbol]). (s ~ 'Service nm anns ms, Generic t, BuildService pro s p ms (Rep t)) => GrpcClient -> t Source #
Fills in a Haskell record of functions with the corresponding
calls to gRPC services from a Mu Service
declaration.
data GRpcMessageProtocol #
Instances
Eq GRpcMessageProtocol | |
Defined in Mu.GRpc.Bridge (==) :: GRpcMessageProtocol -> GRpcMessageProtocol -> Bool # (/=) :: GRpcMessageProtocol -> GRpcMessageProtocol -> Bool # | |
Show GRpcMessageProtocol | |
Defined in Mu.GRpc.Bridge showsPrec :: Int -> GRpcMessageProtocol -> ShowS # show :: GRpcMessageProtocol -> String # showList :: [GRpcMessageProtocol] -> ShowS # |
GRpcTooMuchConcurrency TooMuchConcurrency | |
GRpcErrorCode ErrorCode | |
GRpcErrorString String | |
GRpcClientError ClientError | |
GRpcOk a |
generateRecordFromService :: String -> String -> Namer -> Name -> Q [Dec] Source #
Generate the plain Haskell record corresponding to
a Mu Service
definition, and a concrete implementation
of buildService
for that record.