hyperion-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Hyperion.HoldServer

Synopsis

Documentation

type HoldApi = ("retry" :> (Capture "service" Text :> Get '[JSON] (Maybe Text))) :<|> (("retry-all" :> Get '[JSON] [Text]) :<|> ("list" :> Get '[JSON] [Text])) Source #

newtype HoldMap Source #

Constructors

HoldMap (TVar (Map Text (MVar ()))) 

blockUntilRetried :: MonadIO m => HoldMap -> Text -> m () Source #

Start a hold associated to the given service. Returns an IO action that blocks until the hold is released

withHoldServer :: HoldMap -> (Int -> IO a) -> IO a Source #

Start the hold server on an available port and pass the port number to the given action. The server is killed after the action finishes.