warp-grpc-0.1.0.3: A minimal gRPC server on top of Warp.

Safe HaskellNone
LanguageHaskell2010

Network.GRPC.Server.Wai

Synopsis

Documentation

type WaiHandler Source #

Arguments

 = Decoding

Compression for the request inputs.

-> Encoding

Compression for the request outputs.

-> Request

Request object.

-> (Builder -> IO ())

Write a data chunk in the reply.

-> IO ()

Flush the output.

-> IO () 

A Wai Handler for a request.

data ServiceHandler Source #

Untyped gRPC Service handler.

Constructors

ServiceHandler 

Fields

grpcApp :: [Compression] -> [ServiceHandler] -> Application Source #

Build a WAI Application from a list of ServiceHandler.

Currently, gRPC calls are lookuped up by traversing the list of ServiceHandler. This lookup may be inefficient for large amount of servics.

closeEarly :: GRPCStatus -> IO a Source #

Aborts a GRPC handler with a given GRPCStatus.

grpcService :: [Compression] -> [ServiceHandler] -> Application -> Application Source #

Build a WAI Middleware from a list of ServiceHandler.

Currently, gRPC calls are lookuped up by traversing the list of ServiceHandler. This lookup may be inefficient for large amount of services.

requestAcceptEncodingNames :: Request -> [ByteString] Source #

Looks-up header for encoding outgoing messages.

lookupEncoding :: Request -> [Compression] -> Maybe Encoding Source #

Looks-up the compression to use from a set of known algorithms.

requestDecodingName :: Request -> Maybe ByteString Source #

Looks-up header for decoding incoming messages.

lookupDecoding :: Request -> [Compression] -> Maybe Decoding Source #

Looks-up the compression to use for decoding messages.