Safe Haskell | None |
---|
Utility functions for complex operations carried out by several daemons.
Synopsis
- verifyMasterVotes :: IO (Result Bool)
- verifyMaster :: Int -> IO (Result ())
- handleMasterVerificationOptions :: DaemonOptions -> IO (Either ExitCode ())
Documentation
verifyMasterVotes :: IO (Result Bool) Source #
Gather votes from all nodes and verify that we we are the master. Return True if the voting is won, False if not enough
verifyMaster :: Int -> IO (Result ()) Source #
Verify, by voting, that this node is the master. Bad if we're not. Allow the given number of retries to wait for not available nodes.
handleMasterVerificationOptions :: DaemonOptions -> IO (Either ExitCode ()) Source #
Verify master position according to the options provided, usually by carrying out a voting. Either return unit on success, or a suggested exit code.