Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- class HasSupervisorIntensity s where
- supervisorIntensityL :: Functor f => (Int -> f Int) -> s -> f s
- class HasSupervisorPeriodSeconds s where
- supervisorPeriodSecondsL :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> s -> f s
- class HasSupervisorRestartStrategy s where
- supervisorRestartStrategyL :: Functor f => (SupervisorRestartStrategy -> f SupervisorRestartStrategy) -> s -> f s
- class HasSupervisorProcessSpecList s where
- supervisorProcessSpecListL :: Functor f => ([ProcessSpec m] -> f [ProcessSpec m]) -> s m -> f (s m)
- class HasSupervisorProcessTerminationOrder s where
- supervisorProcessTerminationOrderL :: Functor f => (ProcessTerminationOrder -> f ProcessTerminationOrder) -> s -> f s
- class HasSupervisorIntensityReachedCallback s where
- supervisorOnIntensityReachedL :: Functor f => (m () -> f (m ())) -> s m -> f (s m)
- class HasSupervisorFailureCallback s where
- supervisorOnFailureL :: Functor f => ((SomeException -> m ()) -> f (SomeException -> m ())) -> s m -> f (s m)
- onSystemEventL :: Functor f => ((CapatazEvent -> m ()) -> f (CapatazEvent -> m ())) -> CapatazOptions m -> f (CapatazOptions m)
- workerOnFailureL :: Functor f => ((SomeException -> m ()) -> f (SomeException -> m ())) -> WorkerOptions m -> f (WorkerOptions m)
- workerOnCompletionL :: Functor f => (m () -> f (m ())) -> WorkerOptions m -> f (WorkerOptions m)
- workerOnTerminationL :: Functor f => (m () -> f (m ())) -> WorkerOptions m -> f (WorkerOptions m)
- workerTerminationPolicyL :: Functor f => (WorkerTerminationPolicy -> f WorkerTerminationPolicy) -> WorkerOptions m -> f (WorkerOptions m)
- workerRestartStrategyL :: Functor f => (WorkerRestartStrategy -> f WorkerRestartStrategy) -> WorkerOptions m -> f (WorkerOptions m)
Documentation
class HasSupervisorIntensity s where Source #
supervisorIntensityL :: Functor f => (Int -> f Int) -> s -> f s Source #
Specifies how many errors is a supervisor able to handle; check: http://erlang.org/doc/design_principles/sup_princ.html#max_intensity.
Instances
HasSupervisorIntensity (SupervisorOptions m) Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorIntensityL :: Functor f => (Int -> f Int) -> SupervisorOptions m -> f (SupervisorOptions m) Source # | |
HasSupervisorIntensity (CapatazOptions m) Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorIntensityL :: Functor f => (Int -> f Int) -> CapatazOptions m -> f (CapatazOptions m) Source # |
class HasSupervisorPeriodSeconds s where Source #
supervisorPeriodSecondsL :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> s -> f s Source #
Specifies period of time in which a supervisor can receive a number of errors specified in "supervisorIntensityL".
Instances
HasSupervisorPeriodSeconds (SupervisorOptions m) Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorPeriodSecondsL :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> SupervisorOptions m -> f (SupervisorOptions m) Source # | |
HasSupervisorPeriodSeconds (CapatazOptions m) Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorPeriodSecondsL :: Functor f => (NominalDiffTime -> f NominalDiffTime) -> CapatazOptions m -> f (CapatazOptions m) Source # |
class HasSupervisorRestartStrategy s where Source #
supervisorRestartStrategyL :: Functor f => (SupervisorRestartStrategy -> f SupervisorRestartStrategy) -> s -> f s Source #
Specifies the SupervisorRestartStrategy for a root supervisor.
Instances
HasSupervisorRestartStrategy (SupervisorOptions m) Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorRestartStrategyL :: Functor f => (SupervisorRestartStrategy -> f SupervisorRestartStrategy) -> SupervisorOptions m -> f (SupervisorOptions m) Source # | |
HasSupervisorRestartStrategy (CapatazOptions m) Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorRestartStrategyL :: Functor f => (SupervisorRestartStrategy -> f SupervisorRestartStrategy) -> CapatazOptions m -> f (CapatazOptions m) Source # |
class HasSupervisorProcessSpecList s where Source #
supervisorProcessSpecListL :: Functor f => ([ProcessSpec m] -> f [ProcessSpec m]) -> s m -> f (s m) Source #
Specifies a static list of processes that start automatically with a supervisor.
Instances
HasSupervisorProcessSpecList SupervisorOptions Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorProcessSpecListL :: Functor f => ([ProcessSpec m] -> f [ProcessSpec m]) -> SupervisorOptions m -> f (SupervisorOptions m) Source # | |
HasSupervisorProcessSpecList CapatazOptions Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorProcessSpecListL :: Functor f => ([ProcessSpec m] -> f [ProcessSpec m]) -> CapatazOptions m -> f (CapatazOptions m) Source # |
class HasSupervisorProcessTerminationOrder s where Source #
supervisorProcessTerminationOrderL :: Functor f => (ProcessTerminationOrder -> f ProcessTerminationOrder) -> s -> f s Source #
Specifies order in which a supervisor is going to terminate its supervised processes.
Instances
class HasSupervisorIntensityReachedCallback s where Source #
supervisorOnIntensityReachedL :: Functor f => (m () -> f (m ())) -> s m -> f (s m) Source #
Specifies a callback sub-routine that gets executed when there is a breach in a supervisor's error intensity.
Instances
HasSupervisorIntensityReachedCallback SupervisorOptions Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorOnIntensityReachedL :: Functor f => (m () -> f (m ())) -> SupervisorOptions m -> f (SupervisorOptions m) Source # | |
HasSupervisorIntensityReachedCallback CapatazOptions Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorOnIntensityReachedL :: Functor f => (m () -> f (m ())) -> CapatazOptions m -> f (CapatazOptions m) Source # |
class HasSupervisorFailureCallback s where Source #
supervisorOnFailureL :: Functor f => ((SomeException -> m ()) -> f (SomeException -> m ())) -> s m -> f (s m) Source #
Specifies callback sub-routine that gets executed when a supervisor fails.
Instances
HasSupervisorFailureCallback SupervisorOptions Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorOnFailureL :: Functor f => ((SomeException -> m ()) -> f (SomeException -> m ())) -> SupervisorOptions m -> f (SupervisorOptions m) Source # | |
HasSupervisorFailureCallback CapatazOptions Source # | |
Defined in Control.Concurrent.Capataz.Internal.Types.Lens supervisorOnFailureL :: Functor f => ((SomeException -> m ()) -> f (SomeException -> m ())) -> CapatazOptions m -> f (CapatazOptions m) Source # |
onSystemEventL :: Functor f => ((CapatazEvent -> m ()) -> f (CapatazEvent -> m ())) -> CapatazOptions m -> f (CapatazOptions m) Source #
workerOnFailureL :: Functor f => ((SomeException -> m ()) -> f (SomeException -> m ())) -> WorkerOptions m -> f (WorkerOptions m) Source #
Specifies callback that gets executed when worker sub-routine has runtime error.
NOTE: the given sub-routine execution may be interrupted depending on the worker WorkerTerminationPolicy.
workerOnCompletionL :: Functor f => (m () -> f (m ())) -> WorkerOptions m -> f (WorkerOptions m) Source #
Specifies callback that gets executed when worker sub-routine completes with no errors.
NOTE: the given sub-routine execution may be interrupted depending on the worker WorkerTerminationPolicy.
workerOnTerminationL :: Functor f => (m () -> f (m ())) -> WorkerOptions m -> f (WorkerOptions m) Source #
Specifies callback that gets executed when worker sub-routine is terminated by its supervisor; this may happen in case of a capataz system shutdown or when there is an AllForOne restart policy in place.
NOTE: the given sub-routine execution may be interrupted depending on the worker WorkerTerminationPolicy.
workerTerminationPolicyL :: Functor f => (WorkerTerminationPolicy -> f WorkerTerminationPolicy) -> WorkerOptions m -> f (WorkerOptions m) Source #
Specifies how to handle a worker termination. See WorkerTerminationPolicy documentation for more details.
workerRestartStrategyL :: Functor f => (WorkerRestartStrategy -> f WorkerRestartStrategy) -> WorkerOptions m -> f (WorkerOptions m) Source #
Specifies how supervisor should deal with an error when worker fails or completes. See WorkerRestartStrategy documentation for more details.