Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- decoder :: Message a => Compression -> Decoder (Either String a)
- fromDecoder :: Decoder (Either String a) -> Either String a
- decodeInput :: (Service s, HasMethod s m) => RPC s m -> Compression -> Decoder (Either String (MethodInput s m))
- decodeOutput :: (Service s, HasMethod s m) => RPC s m -> Compression -> Decoder (Either String (MethodOutput s m))
- encode :: Message m => Compression -> m -> Builder
- fromBuilder :: Builder -> ByteString
- encodeInput :: (Service s, HasMethod s m) => RPC s m -> Compression -> MethodInput s m -> Builder
- encodeOutput :: (Service s, HasMethod s m) => RPC s m -> Compression -> MethodOutput s m -> Builder
- data Compression
- grpcCompressionHV :: Compression -> HeaderValue
- uncompressed :: Compression
- gzip :: Compression
Decoding.
decoder :: Message a => Compression -> Decoder (Either String a) Source #
Decoder for gRPC/HTTP2-encoded Protobuf messages.
decodeInput :: (Service s, HasMethod s m) => RPC s m -> Compression -> Decoder (Either String (MethodInput s m)) Source #
decodeOutput :: (Service s, HasMethod s m) => RPC s m -> Compression -> Decoder (Either String (MethodOutput s m)) Source #
Encoding.
encode :: Message m => Compression -> m -> Builder Source #
Encodes as binary using gRPC/HTTP2 framing.
fromBuilder :: Builder -> ByteString Source #
Finalizes a Builder.
encodeInput :: (Service s, HasMethod s m) => RPC s m -> Compression -> MethodInput s m -> Builder Source #
encodeOutput :: (Service s, HasMethod s m) => RPC s m -> Compression -> MethodOutput s m -> Builder Source #
Compression.
data Compression Source #
Opaque type for handling compression.
So far, only "pure" compression algorithms are supported.
TODO: suport IO-based compression implementations once we move from Builder
.
uncompressed :: Compression Source #
Do not compress.
gzip :: Compression Source #
Use gzip as compression.