mu-grpc-client-0.4.0.2: gRPC clients from Mu definitions
Safe HaskellNone
LanguageHaskell2010

Mu.GRpc.Client.TyApps

Description

For further information over initialization of the connection, consult the http2-client-grpc docs.

Synopsis

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.

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 GRpcReply a Source #

Instances

Instances details
Functor GRpcReply Source # 
Instance details

Defined in Mu.GRpc.Client.Internal

Methods

fmap :: (a -> b) -> GRpcReply a -> GRpcReply b #

(<$) :: a -> GRpcReply b -> GRpcReply a #

Show a => Show (GRpcReply a) Source # 
Instance details

Defined in Mu.GRpc.Client.Internal