bf-haskell-0.1.0.0: Betfair Exchange API

Copyright(C) 2020 Martins Erts
LicenseMIT
MaintainerMartins Erts <martins.erts@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

BfHaskell.StreamingAPI.StreamingComm

Description

 
Synopsis

Documentation

data CommCentre Source #

Contains market and order caches and communication queues Used by both - stream processor and client

ccConnection :: Lens' CommCentre (TVar (Maybe TLSConnection)) Source #

newCommCentre :: MonadIO m => m CommCentre Source #

Creates the default comm centre

modifyMarketCache :: MonadIO m => CommCentre -> (MarketCache -> (MarketCache, a)) -> m a Source #

Modify market cache

modifyOrderCache :: MonadIO m => CommCentre -> (OrderCache -> (OrderCache, a)) -> m a Source #

Modify market cache

addClientUpdate :: MonadIO m => CommCentre -> StreamingMessage -> m () Source #

Add client update to queue

addControlMessage :: MonadIO m => CommCentre -> StreamingControlMessage -> m () Source #

Add control message to queue

readConnection :: MonadIO m => CommCentre -> m (Maybe TLSConnection) Source #

storeConnection :: MonadIO m => CommCentre -> Maybe TLSConnection -> m () Source #