capataz-0.1.0.1: OTP-like supervision trees in Haskell

Safe HaskellNone
LanguageHaskell2010

Control.Concurrent.Capataz.Internal.Types.Lens

Synopsis

Documentation

class HasSupervisorPeriodSeconds s where Source #

Minimal complete definition

supervisorPeriodSecondsL

Methods

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".

class HasSupervisorIntensityReachedCallback s where Source #

Minimal complete definition

supervisorOnIntensityReachedL

Methods

supervisorOnIntensityReachedL :: Functor f => (IO () -> f (IO ())) -> s -> f s Source #

Specifies a callback sub-routine that gets executed when there is a breach in a supervisor's error intensity.

class HasSupervisorFailureCallback s where Source #

Minimal complete definition

supervisorOnFailureL

Methods

supervisorOnFailureL :: Functor f => ((SomeException -> IO ()) -> f (SomeException -> IO ())) -> s -> f s Source #

Specifies callback sub-routine that gets executed when a supervisor fails.

workerOnFailureL :: Functor f => ((SomeException -> IO ()) -> f (SomeException -> IO ())) -> WorkerOptions -> f WorkerOptions 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 => (IO () -> f (IO ())) -> WorkerOptions -> f WorkerOptions 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 => (IO () -> f (IO ())) -> WorkerOptions -> f WorkerOptions 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 -> f WorkerOptions Source #

Specifies how to handle a worker termination. See WorkerTerminationPolicy documentation for more details.

workerRestartStrategyL :: Functor f => (WorkerRestartStrategy -> f WorkerRestartStrategy) -> WorkerOptions -> f WorkerOptions Source #

Specifies how supervisor should deal with an error when worker fails or completes. See WorkerRestartStrategy documentation for more details.