Fundamental streaming types
- type RIO = ResourceT IO
- type Source = Source RIO ByteString
- type Sink = Sink ByteString RIO ()
- type SinkR r = Sink ByteString RIO r
- type Conduit o r = ConduitM ByteString o RIO r
- type Conduit_ = Conduit ByteString ()
- streamList :: [ByteString] -> Producer RIO ByteString
- passThrough :: Conduit ByteString ()
- data LinkType
- type OnError_ = Criticality -> SomeException -> String -> IO ()
- data Criticality
- data StreamException
- type Identifier = String
- type Service = String
- type Identity = ByteString
- type Body = [ByteString]
- type Msec = Int
- type Timeout = Timeout
- type Context = Context
- type Size = Size
- withContext :: Size -> (Context -> IO a) -> IO a
A conduit that links source and sink
applying some transformation to the stream.
Input is always
output and return type may vary.
Simplified Conduit where output
and no final value is returned.
Pass the stream through without applying any transformation to it
can be bound or connected to its address.
Only one peer can bind the address,
all other parties have to connect.
Error handler for all services
that are implemented as background services,
e.g. servers and brokers.
The handler receives the
Criticality of the error event,
the exception and an additional descriptive string.
A good policy is
to terminate or restart the service
Critical error occurs
and to continue, if possible,
on a plain
The error handler may perform additional, user-defined actions,
such as logging the incident or
sending an SMS.
Indicates criticality of the error event
The current operation (e.g. processing a request) has not terminated properly, but the service is able to continue; the error may have been caused by a faulty request or other temporal conditions.
The event has impact on the process, leaving it in an unkown state.
The service cannot recover and will terminate
Internal error, indicating a code error in library
Some convenient definitions
Identity of a communication peer, needed for complex patterns (e.g. broker)