| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.PowerQueue.Worker.Distributed
- newtype AuthToken = AuthToken {
- unAuthToken :: Text
- newtype AppVersion = AppVersion {}
- data WorkMasterConfig = WorkMasterConfig {
- wmc_host :: !Text
- wmc_port :: !Int
- wmc_authToken :: !AuthToken
- wmc_appVersion :: !AppVersion
- wmc_errorHook :: !(ServerErrorEvent -> IO ())
- data ServerErrorEvent
- launchWorkMaster :: forall j. Serialize j => WorkMasterConfig -> QueueBackend j -> IO ()
- data WorkNodeConfig = WorkNodeConfig {
- wnc_hostMaster :: !Text
- wnc_portMaster :: !Int
- wnc_authToken :: !AuthToken
- wnc_appVersion :: !AppVersion
- wnc_errorHook :: !(ClientErrorEvent -> IO ())
- wnc_readyHook :: !(IO ())
- data ClientErrorEvent
- launchWorkNode :: forall j. Serialize j => WorkNodeConfig -> QueueWorker j -> IO ()
- launchReconnectingWorkNode :: forall j. Serialize j => WorkNodeConfig -> (TimeSpan -> IO ()) -> QueueWorker j -> IO ()
Documentation
Constructors
| AuthToken | |
Fields
| |
data WorkMasterConfig Source #
Work master configuration
Constructors
| WorkMasterConfig | |
Fields
| |
data ServerErrorEvent Source #
Work master errors
Constructors
| SeeClientDisconnect | |
| SeeClientBadVersion !AppVersion | |
| SeeInvalidPayload !String |
Instances
launchWorkMaster :: forall j. Serialize j => WorkMasterConfig -> QueueBackend j -> IO () Source #
Launch a work master on current thread that will distribute all incoming work on a queue to connecting worker nodes launched via launchWorkNode
data WorkNodeConfig Source #
Work node configuration
Constructors
| WorkNodeConfig | |
Fields
| |
data ClientErrorEvent Source #
Work node async errors
Constructors
| CeeConnClosed | |
| CeeBadAuthResponse | |
| CeeInvalidAuthResponse | |
| CeeInvalidDrainResponse | |
| CeeServerBadVersion !AppVersion | |
| CeeInvalidPayload !String | |
| CeeWorkerException !String |
Instances
launchWorkNode :: forall j. Serialize j => WorkNodeConfig -> QueueWorker j -> IO () Source #
Launch a worker node on the current thread connecting to a work master launched with launchWorkMaster
launchReconnectingWorkNode Source #
Arguments
| :: Serialize j | |
| => WorkNodeConfig | |
| -> (TimeSpan -> IO ()) | callback: will retry in |
| -> QueueWorker j | |
| -> IO () |