Safe Haskell | None |
---|
- data ServerError
- type ProtocolF = Compose ((,) [ByteString]) (Iteratee ByteString Identity)
- type Protocol = EitherT ServerError (Free ProtocolF)
- call :: [ByteString] -> Iteratee ByteString Identity x -> Protocol x
Documentation
data ServerError Source
SnapshotError Int Int | Client targeted obsolete snapshot. |
ServerError Text | Server couldn't perform the requested operation. |
type ProtocolF = Compose ((,) [ByteString]) (Iteratee ByteString Identity)Source
A Functor
which models a RPC call as a pair in which the first component
is a list of bytestrings (the arguments of the call) and the second is a
pure Iteratee
that consumes the bytes sent from the server and returns the
response of the call.
type Protocol = EitherT ServerError (Free ProtocolF)Source
A monad to represent interactions with a remote server. A free monad over a RPC call functor, augmented with some error conditions.
call :: [ByteString] -> Iteratee ByteString Identity x -> Protocol xSource
Constructs a RPC call from a packed list of arguments and a pure
Iteratee
to consume the response.