simplexmq-6.5.0.16: SimpleXMQ message broker
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simplex.Messaging.Server.Env.STM

Documentation

data ServerConfig s Source #

Constructors

ServerConfig 

Fields

data ServerStoreCfg s where Source #

Constructors

SSCMemory :: Maybe StorePaths -> ServerStoreCfg STMMsgStore 
SSCMemoryJournal 

Fields

SSCDatabaseJournal 

Fields

type family SupportedStore (qs :: QSType) (ms :: MSType) :: Constraint where ... Source #

Equations

SupportedStore 'QSMemory 'MSMemory = () 
SupportedStore 'QSMemory 'MSJournal = () 
SupportedStore 'QSMemory 'MSPostgres = (Int ~ Bool, TypeError ('Text "Storing messages in Postgres DB with queues in memory is not supported")) 
SupportedStore 'QSPostgres 'MSMemory = (Int ~ Bool, TypeError ('Text "Storing messages in memory with queues in Postgres DB is not supported")) 
SupportedStore 'QSPostgres 'MSJournal = () 
SupportedStore 'QSPostgres 'MSPostgres = (Int ~ Bool, TypeError ('Text "Server compiled without server_postgres flag")) 

data StorePaths Source #

Constructors

StorePaths 

Fields

data StartOptions Source #

Constructors

StartOptions 

Fields

data Env s Source #

Constructors

Env 

Fields

data Server s Source #

Constructors

Server 

data ServerSubscribers s Source #

Constructors

ServerSubscribers 

Fields

newtype ProxyAgent Source #

Constructors

ProxyAgent 

data Client s Source #

Constructors

Client 

Fields

type ClientId = Int Source #

data Sub Source #

Constructors

Sub 

Fields

data SubscriptionThread Source #

Constructors

NoSub 
SubPending 
SubThread (Weak ThreadId) 

type family MsgStoreType (qs :: QSType) (ms :: MSType) where ... Source #

data AStoreType Source #

Constructors

forall qs ms.(SupportedStore qs ms, MsgStoreClass (MsgStoreType qs ms)) => ASType (SQSType qs) (SMSType ms) 

newEnv :: ServerConfig s -> IO (Env s) Source #

mkJournalStoreConfig :: QStoreCfg s -> FilePath -> Int -> Int -> Int -> Int64 -> JournalStoreConfig s Source #

msgStore :: Env s -> s Source #

newClient :: ClientId -> Natural -> THandleParams SMPVersion 'TServer -> SystemTime -> IO (Client s) Source #

getServerClients :: Server s -> IO (IntMap (Client s)) Source #

getServerClient :: ClientId -> Server s -> IO (Maybe (Client s)) Source #

insertServerClient :: Client s -> Server s -> IO Bool Source #

getSubscribedClients :: SubscribedClients s -> IO (Map EntityId (TVar (Maybe (Client s)))) Source #

getSubscribedClient :: EntityId -> SubscribedClients s -> IO (Maybe (TVar (Maybe (Client s)))) Source #

sameClientId :: Client s -> Client s -> Bool Source #

sameClient :: Client s -> TVar (Maybe (Client s)) -> STM Bool Source #

readWriteQueueStore :: forall q. StoreQueueClass q => Bool -> (RecipientId -> QueueRec -> IO q) -> FilePath -> STMQueueStore q -> IO (StoreLog 'WriteMode) Source #

storeLogFile' :: ServerStoreCfg s -> Maybe FilePath Source #