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' :: MonadIO m => GrpcClientConfig -> m (Either ClientError GrpcClient)
- setupGrpcClientZipkin :: (MonadIO m, MonadTrace m) => GrpcClientConfig -> Text -> m (Either ClientError GrpcClient)
- gRpcCall :: forall (pro :: GRpcMessageProtocol) (pkg :: Package') (srvName :: Symbol) (methodName :: Symbol) h pkgName services methods. (pkg ~ 'Package ('Just pkgName) services, LookupService services srvName ~ 'Service srvName methods, GRpcServiceMethodCall pro pkgName srvName (LookupMethod methods methodName) h) => GrpcClient -> h
- data GRpcMessageProtocol
- data CompressMode
- data GRpcReply a
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 #
setupGrpcClient' :: MonadIO m => GrpcClientConfig -> m (Either ClientError GrpcClient) Source #
Initialize a connection to a gRPC server.
setupGrpcClientZipkin :: (MonadIO m, MonadTrace m) => GrpcClientConfig -> Text -> m (Either ClientError GrpcClient) Source #
Initialize a connection to a gRPC server and pass information about distributed tracing.
Call methods from the gRPC service
gRpcCall :: forall (pro :: GRpcMessageProtocol) (pkg :: Package') (srvName :: Symbol) (methodName :: Symbol) h pkgName services methods. (pkg ~ 'Package ('Just pkgName) services, LookupService services srvName ~ 'Service srvName methods, GRpcServiceMethodCall pro pkgName srvName (LookupMethod methods methodName) h) => GrpcClient -> h Source #
Call a method from a Mu definition.
This method is thought to be used with TypeApplications
:
gRpcCall @'MsgFormat @"packageName" @ServiceDeclaration @"method"
The additional arguments you must provide to gRpcCall
depend on the signature of the method itself:
* The resulting value is always wrapped in GRpcReply
.
* A single input or output turns into a single value.
* A streaming input or output turns into a Conduit.
data GRpcMessageProtocol #
Serialization formats supported with gRPC.
MsgProtoBuf | Protocol Buffers. |
MsgAvro | Avro. |
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 # |