| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
API
Description
Stable public surface for the core NATS client.
Constructors are intentionally hidden. This lets clients, messages, and subscriptions acquire new capabilities without changing their public representation.
Documentation
data Subscription #
Instances
| Show Subscription | |
Defined in Client.API Methods showsPrec :: Int -> Subscription -> ShowS # show :: Subscription -> String # showList :: [Subscription] -> ShowS # | |
| Eq Subscription | |
Defined in Client.API | |
subscriptionSid :: Subscription -> SID #
data ConnectionState #
Constructors
| ConnectionConnecting | |
| ConnectionConnected | |
| ConnectionReconnecting | |
| ConnectionClosing ClientExitReason | |
| ConnectionClosed ClientExitReason |
Instances
| Show ConnectionState | |
Defined in State.Types Methods showsPrec :: Int -> ConnectionState -> ShowS # show :: ConnectionState -> String # showList :: [ConnectionState] -> ShowS # | |
| Eq ConnectionState | |
Defined in State.Types Methods (==) :: ConnectionState -> ConnectionState -> Bool # (/=) :: ConnectionState -> ConnectionState -> Bool # | |
type Subject = ByteString #
type Payload = ByteString #
type Headers = [(ByteString, ByteString)] #
type PublishOption = CallOption PublishConfig #
type SubscribeOption = CallOption SubscribeConfig #
type RequestOption = CallOption RequestConfig #
type UnsubscribeOption = CallOption UnsubscribeConfig #
type PingOption = CallOption PingConfig #
type FlushOption = CallOption FlushConfig #
type ResetOption = CallOption ResetConfig #
type CloseOption = CallOption CloseConfig #
subscribe :: Client -> Subject -> [SubscribeOption] -> (Message -> IO ()) -> IO (Either NatsError Subscription) #
subscribeOnce :: Client -> Subject -> [SubscribeOption] -> (Message -> IO ()) -> IO (Either NatsError Subscription) #
unsubscribe :: Client -> Subscription -> [UnsubscribeOption] -> IO (Either NatsError ()) #
connectionState :: Client -> IO ConnectionState #
reset :: Client -> [ResetOption] -> IO () #
close :: Client -> [CloseOption] -> IO () #
withReplyTo :: Subject -> PublishOption #
withHeaders :: Headers -> PublishOption #