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

Mu.GRpc.Client.Optics

Description

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

Synopsis

Initialization of the gRPC client

data GRpcConnection (s :: Package') (p :: GRpcMessageProtocol) Source #

Represents a connection to the service s.

Instances

Instances details
(pkg ~ 'Package ('Just pkgName) '[service], service ~ 'Service serviceName methods, SearchMethodOptic p methods m t, KnownName serviceName, KnownName pkgName, KnownName m, MkRPC p) => LabelOptic m A_Getter (GRpcConnection pkg p) (GRpcConnection pkg p) t t Source # 
Instance details

Defined in Mu.GRpc.Client.Optics

initGRpc Source #

Arguments

:: MonadIO m 
=> GrpcClientConfig

gRPC configuration

-> Proxy p 
-> forall s. m (Either ClientError (GRpcConnection s p)) 

Initializes a connection to a gRPC server. Usually the service you are connecting to is inferred from the usage later on. However, it can also be made explicit by using

initGRpc config msgProtoBuf @Service

initGRpcZipkin Source #

Arguments

:: (MonadIO m, MonadTrace m) 
=> GrpcClientConfig

gRPC configuration

-> Proxy p 
-> Text 
-> forall s. m (Either ClientError (GRpcConnection s p)) 

Initializes a connection to a gRPC server, creating a new span for distributed tracing. Usually the service you are connecting to is inferred from the usage later on. However, it can also be made explicit by using

initGRpcZipkin config msgProtoBuf "person" @Service

data GRpcMessageProtocol #

Serialization formats supported with gRPC.

Constructors

MsgProtoBuf

Protocol Buffers.

MsgAvro

Avro.

msgProtoBuf :: Proxy 'MsgProtoBuf #

Choose Protocol Buffers as serialization format for gRPC. This value is commonly used to create a client or server.

msgAvro :: Proxy 'MsgAvro #

Choose Avro as serialization format for gRPC. This value is commonly used to create a client or server.

data GrpcClientConfig #

Configuration to setup a GrpcClient.

Request arguments and responses

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

Re-exported for convenience