Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype MxAgentId = MxAgentId {}
- data MxAgentState s = MxAgentState {}
- newtype MxAgent s a = MxAgent {
- unAgent :: StateT (MxAgentState s) Process a
- data MxAction
- data ChannelSelector
- type Fork = Process () -> IO ProcessId
- type MxSink s = Message -> MxAgent s (Maybe MxAction)
- data MxEvent
- = MxSpawned ProcessId
- | MxRegistered ProcessId String
- | MxUnRegistered ProcessId String
- | MxProcessDied ProcessId DiedReason
- | MxNodeDied NodeId DiedReason
- | MxSent ProcessId ProcessId Message
- | MxSentToName String ProcessId Message
- | MxSentToPort ProcessId SendPortId Message
- | MxReceived ProcessId Message
- | MxReceivedPort SendPortId Message
- | MxConnected ConnectionId EndPointAddress
- | MxDisconnected ConnectionId EndPointAddress
- | MxUser Message
- | MxLog String
- | MxTraceTakeover ProcessId
- | MxTraceDisable
- class Addressable a where
- resolveToPid :: a -> Maybe ProcessId
Documentation
A newtype wrapper for an agent id (which is a string).
data MxAgentState s Source #
Instances
MonadState (MxAgentState s) (MxAgent s) Source # | |
Defined in Control.Distributed.Process.Management.Internal.Types get :: MxAgent s (MxAgentState s) # put :: MxAgentState s -> MxAgent s () # state :: (MxAgentState s -> (a, MxAgentState s)) -> MxAgent s a # |
Monad for management agents.
MxAgent | |
|
Instances
MonadFix (MxAgent s) Source # | |
MonadIO (MxAgent s) Source # | |
Applicative (MxAgent s) Source # | |
Functor (MxAgent s) Source # | |
Monad (MxAgent s) Source # | |
MonadState (MxAgentState s) (MxAgent s) Source # | |
Defined in Control.Distributed.Process.Management.Internal.Types get :: MxAgent s (MxAgentState s) # put :: MxAgentState s -> MxAgent s () # state :: (MxAgentState s -> (a, MxAgentState s)) -> MxAgent s a # |
Represents the actions a management agent can take when evaluating an event sink.
type Fork = Process () -> IO ProcessId Source #
Gross though it is, this synonym represents a function used to forking new processes, which has to be passed as a HOF when calling mxAgentController, since there's no other way to avoid a circular dependency with Node.hs
type MxSink s = Message -> MxAgent s (Maybe MxAction) Source #
Type of a management agent's event sink.
This is the default management event, fired for various internal events around the NT connection and Process lifecycle. All published events that conform to this type, are eligible for tracing - i.e., they will be delivered to the trace controller.
MxSpawned ProcessId | fired whenever a local process is spawned |
MxRegistered ProcessId String | fired whenever a process/name is registered (locally) |
MxUnRegistered ProcessId String | fired whenever a process/name is unregistered (locally) |
MxProcessDied ProcessId DiedReason | fired whenever a process dies |
MxNodeDied NodeId DiedReason | fired whenever a node dies (i.e., the connection is broken/disconnected) |
MxSent ProcessId ProcessId Message | fired whenever a message is sent from a local process |
MxSentToName String ProcessId Message | fired whenever a named send occurs |
MxSentToPort ProcessId SendPortId Message | fired whenever a sendChan occurs |
MxReceived ProcessId Message | fired whenever a message is received by a local process |
MxReceivedPort SendPortId Message | fired whenever a message is received via a typed channel |
MxConnected ConnectionId EndPointAddress | fired when a network-transport connection is first established |
MxDisconnected ConnectionId EndPointAddress | fired when a network-transport connection is broken/disconnected |
MxUser Message | a user defined trace event |
MxLog String | a logging event - used for debugging purposes only |
MxTraceTakeover ProcessId | notifies a trace listener that all subsequent traces will be sent to pid |
MxTraceDisable | notifies a trace listener that it has been disabled/removed |
Instances
class Addressable a where Source #
The class of things that we might be able to resolve to
a ProcessId
(or not).
resolveToPid :: a -> Maybe ProcessId Source #