Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data MuxError = MuxError {
- errorType :: !MuxErrorType
- errorMsg :: !String
- data MuxErrorType
- handleIOException :: MonadThrow m => String -> IOException -> m a
- data MuxTrace
- = MuxTraceRecvHeaderStart
- | MuxTraceRecvHeaderEnd MuxSDUHeader
- | MuxTraceRecvDeltaQObservation MuxSDUHeader Time
- | MuxTraceRecvDeltaQSample Double Int Int Double Double Double Double String
- | MuxTraceRecvStart Int
- | MuxTraceRecvEnd Int
- | MuxTraceSendStart MuxSDUHeader
- | MuxTraceSendEnd
- | MuxTraceState MuxBearerState
- | MuxTraceCleanExit MiniProtocolNum MiniProtocolDir
- | MuxTraceExceptionExit MiniProtocolNum MiniProtocolDir SomeException
- | MuxTraceChannelRecvStart MiniProtocolNum
- | MuxTraceChannelRecvEnd MiniProtocolNum Int
- | MuxTraceChannelSendStart MiniProtocolNum Int
- | MuxTraceChannelSendEnd MiniProtocolNum
- | MuxTraceHandshakeStart
- | MuxTraceHandshakeClientEnd DiffTime
- | MuxTraceHandshakeServerEnd
- | Exception e => MuxTraceHandshakeClientError e DiffTime
- | Exception e => MuxTraceHandshakeServerError e
- | MuxTraceSDUReadTimeoutException
- | MuxTraceSDUWriteTimeoutException
- | MuxTraceStartEagerly MiniProtocolNum MiniProtocolDir
- | MuxTraceStartOnDemand MiniProtocolNum MiniProtocolDir
- | MuxTraceStartedOnDemand MiniProtocolNum MiniProtocolDir
- | MuxTraceTerminating MiniProtocolNum MiniProtocolDir
- | MuxTraceStopping
- | MuxTraceStopped
- | MuxTraceTCPInfo StructTCPInfo Word16
- data MuxBearerState
- data WithMuxBearer peerid a = WithMuxBearer {}
- data TraceLabelPeer peerid a = TraceLabelPeer peerid a
Documentation
Error type used in across the mux layer.
MuxError | |
|
Instances
data MuxErrorType Source #
Enumeration of error conditions.
MuxUnknownMiniProtocol | returned by |
MuxDecodeError | return by |
MuxBearerClosed | thrown by |
MuxIngressQueueOverRun | thrown by |
MuxInitiatorOnly | thrown when data arrives on a responder channel when the
mux was set up as an |
MuxIOException IOException |
|
MuxSDUReadTimeout | thrown when reading of a single SDU takes too long |
MuxSDUWriteTimeout | thrown when writing a single SDU takes too long |
MuxShutdown !(Maybe MuxErrorType) | Result of runMiniProtocol's completionAction in case of an error or mux being closed while a mini-protocol was still running, this is not a clean exit. |
MuxCleanShutdown | Mux stopped by |
Instances
Show MuxErrorType Source # | |
Defined in Network.Mux.Trace showsPrec :: Int -> MuxErrorType -> ShowS # show :: MuxErrorType -> String # showList :: [MuxErrorType] -> ShowS # | |
Eq MuxErrorType Source # | |
Defined in Network.Mux.Trace (==) :: MuxErrorType -> MuxErrorType -> Bool # (/=) :: MuxErrorType -> MuxErrorType -> Bool # |
handleIOException :: MonadThrow m => String -> IOException -> m a Source #
Handler for IOException
s which wraps them in MuxError
.
It is used various MuxBearer
implementations:
* socketAsMuxBearer
* pipeAsMuxBearer
Enumeration of Mux events that can be traced.
MuxTraceRecvHeaderStart | |
MuxTraceRecvHeaderEnd MuxSDUHeader | |
MuxTraceRecvDeltaQObservation MuxSDUHeader Time | |
MuxTraceRecvDeltaQSample Double Int Int Double Double Double Double String | |
MuxTraceRecvStart Int | |
MuxTraceRecvEnd Int | |
MuxTraceSendStart MuxSDUHeader | |
MuxTraceSendEnd | |
MuxTraceState MuxBearerState | |
MuxTraceCleanExit MiniProtocolNum MiniProtocolDir | |
MuxTraceExceptionExit MiniProtocolNum MiniProtocolDir SomeException | |
MuxTraceChannelRecvStart MiniProtocolNum | |
MuxTraceChannelRecvEnd MiniProtocolNum Int | |
MuxTraceChannelSendStart MiniProtocolNum Int | |
MuxTraceChannelSendEnd MiniProtocolNum | |
MuxTraceHandshakeStart | |
MuxTraceHandshakeClientEnd DiffTime | |
MuxTraceHandshakeServerEnd | |
Exception e => MuxTraceHandshakeClientError e DiffTime | |
Exception e => MuxTraceHandshakeServerError e | |
MuxTraceSDUReadTimeoutException | |
MuxTraceSDUWriteTimeoutException | |
MuxTraceStartEagerly MiniProtocolNum MiniProtocolDir | |
MuxTraceStartOnDemand MiniProtocolNum MiniProtocolDir | |
MuxTraceStartedOnDemand MiniProtocolNum MiniProtocolDir | |
MuxTraceTerminating MiniProtocolNum MiniProtocolDir | |
MuxTraceStopping | |
MuxTraceStopped | |
MuxTraceTCPInfo StructTCPInfo Word16 |
data MuxBearerState Source #
Mature | MuxBearer has successfully completed the handshake. |
Dead | MuxBearer is dead and the underlying bearer has been closed. |
Instances
Show MuxBearerState Source # | |
Defined in Network.Mux.Trace showsPrec :: Int -> MuxBearerState -> ShowS # show :: MuxBearerState -> String # showList :: [MuxBearerState] -> ShowS # | |
Eq MuxBearerState Source # | |
Defined in Network.Mux.Trace (==) :: MuxBearerState -> MuxBearerState -> Bool # (/=) :: MuxBearerState -> MuxBearerState -> Bool # |
data WithMuxBearer peerid a Source #
Type used for tracing mux events.
Instances
Generic (WithMuxBearer peerid a) Source # | |||||
Defined in Network.Mux.Trace
from :: WithMuxBearer peerid a -> Rep (WithMuxBearer peerid a) x # to :: Rep (WithMuxBearer peerid a) x -> WithMuxBearer peerid a # | |||||
(Show peerid, Show a) => Show (WithMuxBearer peerid a) Source # | |||||
Defined in Network.Mux.Trace showsPrec :: Int -> WithMuxBearer peerid a -> ShowS # show :: WithMuxBearer peerid a -> String # showList :: [WithMuxBearer peerid a] -> ShowS # | |||||
type Rep (WithMuxBearer peerid a) Source # | |||||
Defined in Network.Mux.Trace type Rep (WithMuxBearer peerid a) = D1 ('MetaData "WithMuxBearer" "Network.Mux.Trace" "network-mux-0.4.5.3-inplace" 'False) (C1 ('MetaCons "WithMuxBearer" 'PrefixI 'True) (S1 ('MetaSel ('Just "wmbPeerId") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 peerid) :*: S1 ('MetaSel ('Just "wmbEvent") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a))) |
data TraceLabelPeer peerid a Source #
A peer label for use in Tracer
s. This annotates tracer output as being
associated with a given peer identifier.
TraceLabelPeer peerid a |
Instances
Bifunctor TraceLabelPeer Source # | |
Defined in Network.Mux.Trace bimap :: (a -> b) -> (c -> d) -> TraceLabelPeer a c -> TraceLabelPeer b d # first :: (a -> b) -> TraceLabelPeer a c -> TraceLabelPeer b c # second :: (b -> c) -> TraceLabelPeer a b -> TraceLabelPeer a c # | |
Functor (TraceLabelPeer peerid) Source # | |
Defined in Network.Mux.Trace fmap :: (a -> b) -> TraceLabelPeer peerid a -> TraceLabelPeer peerid b # (<$) :: a -> TraceLabelPeer peerid b -> TraceLabelPeer peerid a # | |
(Show peerid, Show a) => Show (TraceLabelPeer peerid a) Source # | |
Defined in Network.Mux.Trace showsPrec :: Int -> TraceLabelPeer peerid a -> ShowS # show :: TraceLabelPeer peerid a -> String # showList :: [TraceLabelPeer peerid a] -> ShowS # | |
(Eq peerid, Eq a) => Eq (TraceLabelPeer peerid a) Source # | |
Defined in Network.Mux.Trace (==) :: TraceLabelPeer peerid a -> TraceLabelPeer peerid a -> Bool # (/=) :: TraceLabelPeer peerid a -> TraceLabelPeer peerid a -> Bool # |