| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
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
| |
Constructors
| Env | |
Fields
| |
Constructors
| Server | |
Fields
| |
data ServerSubscribers s Source #
Constructors
| ServerSubscribers | |
Fields
| |
data SubscribedClients s Source #
newtype ProxyAgent Source #
Constructors
| ProxyAgent | |
Fields | |
Constructors
| Client | |
Fields
| |
Constructors
| ServerSub (TVar SubscriptionThread) | |
| ProhibitSub |
data SubscriptionThread Source #
Constructors
| NoSub | |
| SubPending | |
| SubThread (Weak ThreadId) |
type family MsgStoreType (qs :: QSType) (ms :: MSType) where ... Source #
Equations
| MsgStoreType 'QSMemory 'MSMemory = STMMsgStore | |
| MsgStoreType qs 'MSJournal = JournalMsgStore qs |
data MsgStore s where Source #
Constructors
| StoreMemory :: STMMsgStore -> MsgStore STMMsgStore | |
| StoreJournal :: JournalMsgStore qs -> MsgStore (JournalMsgStore qs) |
data AStoreType Source #
Constructors
| forall qs ms.(SupportedStore qs ms, MsgStoreClass (MsgStoreType qs ms)) => ASType (SQSType qs) (SMSType ms) |
type VerifiedTransmission s = (Maybe (StoreQueue s, QueueRec), Transmission Cmd) Source #
type ResponseAndMessage = (Transmission BrokerMsg, Maybe (Transmission BrokerMsg)) Source #
newEnv :: ServerConfig s -> IO (Env s) Source #
mkJournalStoreConfig :: QStoreCfg s -> FilePath -> Int -> Int -> Int -> Int64 -> JournalStoreConfig s Source #
fromMsgStore :: MsgStore s -> s Source #
newClient :: ClientId -> Natural -> THandleParams SMPVersion 'TServer -> SystemTime -> IO (Client s) Source #
getServerClients :: Server s -> IO (IntMap (Client s)) Source #
insertServerClient :: Client s -> Server s -> IO Bool Source #
deleteServerClient :: ClientId -> Server s -> IO () Source #
getSubscribedClients :: SubscribedClients s -> IO (Map EntityId (TVar (Maybe (Client s)))) Source #
getSubscribedClient :: EntityId -> SubscribedClients s -> IO (Maybe (TVar (Maybe (Client s)))) Source #
upsertSubscribedClient :: EntityId -> Client s -> SubscribedClients s -> STM (Maybe (Client s)) Source #
lookupSubscribedClient :: EntityId -> SubscribedClients s -> STM (Maybe (Client s)) Source #
lookupDeleteSubscribedClient :: EntityId -> SubscribedClients s -> STM (Maybe (Client s)) Source #
deleteSubcribedClient :: EntityId -> Client s -> SubscribedClients s -> IO () Source #
sameClientId :: Client s -> Client s -> Bool Source #
sameClient :: Client s -> TVar (Maybe (Client s)) -> STM Bool Source #
newSubscription :: SubscriptionThread -> STM Sub Source #
newProhibitedSub :: STM Sub Source #
defaultMsgQueueQuota :: Int Source #
defMsgExpirationDays :: Int64 Source #
defNtfExpirationHours :: Int64 Source #
defaultProxyClientConcurrency :: Int Source #
defaultMaxJournalMsgCount :: Int Source #
defaultMaxJournalStateLines :: Int Source #
defaultIdleQueueInterval :: Int64 Source #
journalMsgStoreDepth :: Int Source #
readWriteQueueStore :: forall q. StoreQueueClass q => Bool -> (RecipientId -> QueueRec -> IO q) -> FilePath -> STMQueueStore q -> IO (StoreLog 'WriteMode) Source #
noPostgresExitStr :: String Source #
noPostgresExit :: IO a Source #
dbStoreCfg :: ServerStoreCfg s -> Maybe PostgresStoreCfg Source #
storeLogFile' :: ServerStoreCfg s -> Maybe FilePath Source #