Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type WaiHandler = Decoding -> Encoding -> Request -> (Builder -> IO ()) -> IO () -> IO ()
- data ServiceHandler = ServiceHandler {}
- grpcApp :: [Compression] -> [ServiceHandler] -> Application
- closeEarly :: GRPCStatus -> IO a
- grpcService :: [Compression] -> [ServiceHandler] -> Application -> Application
- requestAcceptEncodingNames :: Request -> [ByteString]
- lookupEncoding :: Request -> [Compression] -> Maybe Encoding
- requestDecodingName :: Request -> Maybe ByteString
- lookupDecoding :: Request -> [Compression] -> Maybe Decoding
Documentation
type WaiHandler Source #
= 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.
ServiceHandler | |
|
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.