Safe Haskell | None |
---|---|
Language | Haskell2010 |
Currently Protocol Buffers and Avro can be used as
serialization format for the messages in gRPC
requests and replies. This module provides types
and proxies used in both mu-grpc-client
and
mu-grpc-server
to drive this choice of serialization.
Synopsis
- data GRpcMessageProtocol
- msgProtoBuf :: Proxy 'MsgProtoBuf
- msgAvro :: Proxy 'MsgAvro
- class MkRPC (p :: GRpcMessageProtocol) where
- type RPCTy p :: Type
- mkRPC :: Proxy p -> ByteString -> ByteString -> ByteString -> RPCTy p
Documentation
data GRpcMessageProtocol Source #
Serialization formats supported with gRPC.
MsgProtoBuf | Protocol Buffers. |
MsgAvro | Avro. |
Instances
Eq GRpcMessageProtocol Source # | |
Defined in Mu.GRpc.Bridge (==) :: GRpcMessageProtocol -> GRpcMessageProtocol -> Bool # (/=) :: GRpcMessageProtocol -> GRpcMessageProtocol -> Bool # | |
Show GRpcMessageProtocol Source # | |
Defined in Mu.GRpc.Bridge showsPrec :: Int -> GRpcMessageProtocol -> ShowS # show :: GRpcMessageProtocol -> String # showList :: [GRpcMessageProtocol] -> ShowS # |
msgProtoBuf :: Proxy 'MsgProtoBuf Source #
Choose Protocol Buffers as serialization format for gRPC. This value is commonly used to create a client or server.
msgAvro :: Proxy 'MsgAvro Source #
Choose Avro as serialization format for gRPC. This value is commonly used to create a client or server.
class MkRPC (p :: GRpcMessageProtocol) where Source #
Defines how to build serialization-specific RPC locators from a triple of (package, server, method).
mkRPC :: Proxy p -> ByteString -> ByteString -> ByteString -> RPCTy p Source #
Instances
MkRPC 'MsgProtoBuf Source # | |
Defined in Mu.GRpc.Bridge type RPCTy 'MsgProtoBuf Source # mkRPC :: Proxy 'MsgProtoBuf -> ByteString -> ByteString -> ByteString -> RPCTy 'MsgProtoBuf Source # | |
MkRPC 'MsgAvro Source # | |
Defined in Mu.GRpc.Bridge mkRPC :: Proxy 'MsgAvro -> ByteString -> ByteString -> ByteString -> RPCTy 'MsgAvro Source # |