Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data RabbitMqHooks m = RabbitMqHooks {
- onNewChannel :: Channel -> m ()
- onConnectionClose :: m ()
- onChannelException :: SomeException -> m ()
- data RabbitMqAdminOpts = RabbitMqAdminOpts {}
- data AmqpEndpoint = AmqpEndpoint {}
- withConnection :: forall m a. (MonadIO m, MonadMask m) => Logger -> AmqpEndpoint -> (Connection -> m a) -> m a
- openConnectionWithRetries :: forall m. (MonadIO m, MonadMask m, MonadBaseControl IO m) => Logger -> AmqpEndpoint -> RabbitMqHooks m -> m ()
- mkRabbitMqAdminClientEnv :: RabbitMqAdminOpts -> IO (AdminAPI (AsClientT IO))
- mkRabbitMqAdminClientEnvWithCreds :: RabbitMqAdminOpts -> Text -> Text -> IO (AdminAPI (AsClientT IO))
- mkRabbitMqChannelMVar :: Logger -> AmqpEndpoint -> IO (MVar Channel)
- demoteOpts :: RabbitMqAdminOpts -> AmqpEndpoint
- data RabbitMqTlsOpts = RabbitMqTlsOpts {
- caCert :: !(Maybe FilePath)
- insecureSkipVerifyTls :: Bool
- mkConnectionOpts :: MonadIO m => AmqpEndpoint -> m ConnectionOpts
- mkTLSSettings :: HostName -> RabbitMqTlsOpts -> IO TLSSettings
- readCredsFromEnv :: IO (Text, Text)
Documentation
data RabbitMqHooks m Source #
RabbitMqHooks | |
|
data RabbitMqAdminOpts Source #
Instances
FromJSON RabbitMqAdminOpts Source # | |
Defined in Network.AMQP.Extended parseJSON :: Value -> Parser RabbitMqAdminOpts Source # parseJSONList :: Value -> Parser [RabbitMqAdminOpts] Source # | |
Show RabbitMqAdminOpts Source # | |
Defined in Network.AMQP.Extended showsPrec :: Int -> RabbitMqAdminOpts -> ShowS # show :: RabbitMqAdminOpts -> String # showList :: [RabbitMqAdminOpts] -> ShowS # | |
Eq RabbitMqAdminOpts Source # | |
Defined in Network.AMQP.Extended (==) :: RabbitMqAdminOpts -> RabbitMqAdminOpts -> Bool # (/=) :: RabbitMqAdminOpts -> RabbitMqAdminOpts -> Bool # |
data AmqpEndpoint Source #
When admin opts are needed use `AmqpEndpoint Identity`, otherwise use `AmqpEndpoint NoAdmin`.
Instances
FromJSON AmqpEndpoint Source # | |
Defined in Network.AMQP.Extended parseJSON :: Value -> Parser AmqpEndpoint Source # parseJSONList :: Value -> Parser [AmqpEndpoint] Source # | |
Show AmqpEndpoint Source # | |
Defined in Network.AMQP.Extended showsPrec :: Int -> AmqpEndpoint -> ShowS # show :: AmqpEndpoint -> String # showList :: [AmqpEndpoint] -> ShowS # | |
Eq AmqpEndpoint Source # | |
Defined in Network.AMQP.Extended (==) :: AmqpEndpoint -> AmqpEndpoint -> Bool # (/=) :: AmqpEndpoint -> AmqpEndpoint -> Bool # |
withConnection :: forall m a. (MonadIO m, MonadMask m) => Logger -> AmqpEndpoint -> (Connection -> m a) -> m a Source #
Connects with RabbitMQ and opens a channel.
openConnectionWithRetries :: forall m. (MonadIO m, MonadMask m, MonadBaseControl IO m) => Logger -> AmqpEndpoint -> RabbitMqHooks m -> m () Source #
Connects with RabbitMQ and opens a channel. If the channel is closed for some reasons, reopens the channel. If the connection is closed for some reasons, keeps retrying to connect until it works.
mkRabbitMqAdminClientEnvWithCreds :: RabbitMqAdminOpts -> Text -> Text -> IO (AdminAPI (AsClientT IO)) Source #
mkRabbitMqChannelMVar :: Logger -> AmqpEndpoint -> IO (MVar Channel) Source #
Useful if the application only pushes into some queues.
data RabbitMqTlsOpts Source #
Instances
Show RabbitMqTlsOpts Source # | |
Defined in Network.AMQP.Extended showsPrec :: Int -> RabbitMqTlsOpts -> ShowS # show :: RabbitMqTlsOpts -> String # showList :: [RabbitMqTlsOpts] -> ShowS # | |
Eq RabbitMqTlsOpts Source # | |
Defined in Network.AMQP.Extended (==) :: RabbitMqTlsOpts -> RabbitMqTlsOpts -> Bool # (/=) :: RabbitMqTlsOpts -> RabbitMqTlsOpts -> Bool # |
mkConnectionOpts :: MonadIO m => AmqpEndpoint -> m ConnectionOpts Source #
mkTLSSettings :: HostName -> RabbitMqTlsOpts -> IO TLSSettings Source #