Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data AgentClient = AgentClient {
- rcvQ :: TBQueue (ATransmission 'Client)
- subQ :: TBQueue (ATransmission 'Agent)
- msgQ :: TBQueue SMPServerTransmission
- smpClients :: TVar (Map SMPServer SMPClient)
- subscrSrvrs :: TVar (Map SMPServer (Map ConnId RcvQueue))
- subscrConns :: TVar (Map ConnId SMPServer)
- activations :: TVar (Map ConnId (Async ()))
- connMsgQueues :: TVar (Map ConnId (TQueue PendingMsg))
- connMsgDeliveries :: TVar (Map ConnId (Async ()))
- srvMsgQueues :: TVar (Map SMPServer (TQueue PendingMsg))
- srvMsgDeliveries :: TVar (Map SMPServer (Async ()))
- reconnections :: TVar [Async ()]
- clientId :: Int
- agentEnv :: Env
- smpSubscriber :: Async ()
- lock :: TMVar ()
- newAgentClient :: Env -> STM AgentClient
- type AgentMonad m = (MonadUnliftIO m, MonadReader Env m, MonadError AgentErrorType m)
- withAgentLock :: MonadUnliftIO m => AgentClient -> m a -> m a
- closeAgentClient :: MonadUnliftIO m => AgentClient -> m ()
- newRcvQueue :: AgentMonad m => AgentClient -> SMPServer -> m (RcvQueue, SMPQueueUri, EncryptionKey)
- subscribeQueue :: AgentMonad m => AgentClient -> RcvQueue -> ConnId -> m ()
- addSubscription :: MonadUnliftIO m => AgentClient -> RcvQueue -> ConnId -> m ()
- sendConfirmation :: forall m. AgentMonad m => AgentClient -> SndQueue -> SenderPublicKey -> ConnInfo -> m ()
- sendInvitation :: forall m. AgentMonad m => AgentClient -> SMPQueueUri -> EncryptionKey -> ConnectionRequest 'CMInvitation -> ConnInfo -> m ()
- data RetryInterval = RetryInterval {
- initialInterval :: Int
- increaseAfter :: Int
- maxInterval :: Int
- sendHello :: forall m. AgentMonad m => AgentClient -> SndQueue -> VerificationKey -> RetryInterval -> m ()
- secureQueue :: AgentMonad m => AgentClient -> RcvQueue -> SenderPublicKey -> m ()
- sendAgentMessage :: AgentMonad m => AgentClient -> SndQueue -> ByteString -> m ()
- decryptAndVerify :: AgentMonad m => RcvQueue -> ByteString -> m ByteString
- verifyMessage :: AgentMonad m => Maybe VerificationKey -> ByteString -> m ByteString
- sendAck :: AgentMonad m => AgentClient -> RcvQueue -> m ()
- suspendQueue :: AgentMonad m => AgentClient -> RcvQueue -> m ()
- deleteQueue :: AgentMonad m => AgentClient -> RcvQueue -> m ()
- logServer :: AgentMonad m => ByteString -> AgentClient -> SMPServer -> QueueId -> ByteString -> m ()
- removeSubscription :: AgentMonad m => AgentClient -> ConnId -> m ()
- cryptoError :: CryptoError -> AgentErrorType
- addActivation :: MonadUnliftIO m => AgentClient -> ConnId -> Async () -> m ()
- getActivation :: MonadUnliftIO m => AgentClient -> ConnId -> m (Maybe (Async ()))
- removeActivation :: MonadUnliftIO m => AgentClient -> ConnId -> m ()
Documentation
data AgentClient Source #
AgentClient | |
|
newAgentClient :: Env -> STM AgentClient Source #
type AgentMonad m = (MonadUnliftIO m, MonadReader Env m, MonadError AgentErrorType m) Source #
Agent monad with MonadReader Env and MonadError AgentErrorType
withAgentLock :: MonadUnliftIO m => AgentClient -> m a -> m a Source #
closeAgentClient :: MonadUnliftIO m => AgentClient -> m () Source #
newRcvQueue :: AgentMonad m => AgentClient -> SMPServer -> m (RcvQueue, SMPQueueUri, EncryptionKey) Source #
subscribeQueue :: AgentMonad m => AgentClient -> RcvQueue -> ConnId -> m () Source #
addSubscription :: MonadUnliftIO m => AgentClient -> RcvQueue -> ConnId -> m () Source #
sendConfirmation :: forall m. AgentMonad m => AgentClient -> SndQueue -> SenderPublicKey -> ConnInfo -> m () Source #
sendInvitation :: forall m. AgentMonad m => AgentClient -> SMPQueueUri -> EncryptionKey -> ConnectionRequest 'CMInvitation -> ConnInfo -> m () Source #
data RetryInterval Source #
sendHello :: forall m. AgentMonad m => AgentClient -> SndQueue -> VerificationKey -> RetryInterval -> m () Source #
secureQueue :: AgentMonad m => AgentClient -> RcvQueue -> SenderPublicKey -> m () Source #
sendAgentMessage :: AgentMonad m => AgentClient -> SndQueue -> ByteString -> m () Source #
decryptAndVerify :: AgentMonad m => RcvQueue -> ByteString -> m ByteString Source #
verifyMessage :: AgentMonad m => Maybe VerificationKey -> ByteString -> m ByteString Source #
sendAck :: AgentMonad m => AgentClient -> RcvQueue -> m () Source #
suspendQueue :: AgentMonad m => AgentClient -> RcvQueue -> m () Source #
deleteQueue :: AgentMonad m => AgentClient -> RcvQueue -> m () Source #
logServer :: AgentMonad m => ByteString -> AgentClient -> SMPServer -> QueueId -> ByteString -> m () Source #
removeSubscription :: AgentMonad m => AgentClient -> ConnId -> m () Source #
addActivation :: MonadUnliftIO m => AgentClient -> ConnId -> Async () -> m () Source #
getActivation :: MonadUnliftIO m => AgentClient -> ConnId -> m (Maybe (Async ())) Source #
removeActivation :: MonadUnliftIO m => AgentClient -> ConnId -> m () Source #