Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Connection = Connection {}
- data ConnectionOpts = ConnectionOpts {
- coServers :: ![(String, PortNumber)]
- coVHost :: !Text
- coAuth :: ![SASLMechanism]
- coMaxFrameSize :: !(Maybe Word32)
- coHeartbeatDelay :: !(Maybe Word16)
- coMaxChannel :: !(Maybe Word16)
- coTLSSettings :: Maybe TLSSettings
- coName :: !(Maybe Text)
- defaultConnectionOpts :: ConnectionOpts
- connect :: MonadIO m => ConnectionOpts -> m Connection
- disconnect :: MonadIO m => Connection -> m ()
- withChannel :: Connection -> (Channel -> IO b) -> IO b
Documentation
data Connection Source #
data ConnectionOpts #
Represents the parameters to connect to a broker or a cluster of brokers.
See defaultConnectionOpts
.
ConnectionOpts | |
|
defaultConnectionOpts :: ConnectionOpts #
Constructs default connection options with the following settings :
- Broker:
amqp://guest:guest@localhost:5672/%2F
using thePLAIN
SASL mechanism - max frame size:
131072
- use the heartbeat delay suggested by the broker
- no limit on the number of used channels
connect :: MonadIO m => ConnectionOpts -> m Connection Source #
Connect to the AMQP server.
conn <- connect (fromURI "amqp://guest:guest@localhost:5672")
disconnect :: MonadIO m => Connection -> m () Source #
withChannel :: Connection -> (Channel -> IO b) -> IO b Source #
Perform an action with a channel resource, and give it back at the end