craze-0.1.3.0: HTTP Racing Library

Safe HaskellNone
LanguageHaskell2010

Network.Craze.Internal

Documentation

type ClientMap ht bt a = Map (Async (CurlResponse_ ht bt)) (ClientState a) Source

data RaceState ht bt a Source

rsReturnLast :: forall ht bt a. Lens' (RaceState ht bt a) Bool Source

rsHandler :: forall ht bt a. Lens' (RaceState ht bt a) (RacerHandler ht bt a) Source

rsDebug :: forall ht bt a. Lens' (RaceState ht bt a) Bool Source

rsClientMap :: forall ht bt a. Lens' (RaceState ht bt a) (ClientMap ht bt a) Source

rsChecker :: forall ht bt a. Lens' (RaceState ht bt a) (RacerChecker a) Source

makeRaceState :: (CurlHeader ht, CurlBuffer bt, MonadIO m) => Text -> Racer ht bt a -> m (RaceState ht bt a) Source

cancelAll :: MonadIO m => [Async a] -> m () Source

cancelRemaining :: (MonadIO m, MonadState (RaceState ht bt a) m) => m () Source

onlyPending :: ClientMap ht bt a -> ClientMap ht bt a Source

markAsSuccessful :: MonadState (RaceState ht bt a) m => Async (CurlResponse_ ht bt) -> a -> m () Source

markAsFailure :: MonadState (RaceState ht bt a) m => Async (CurlResponse_ ht bt) -> a -> m () Source

waitForOne :: (Eq a, MonadIO m, MonadState (RaceState ht bt a) m) => m (Maybe (Async (CurlResponse_ ht bt), a)) Source