A nats.io client for Elm
Publish a new message on a given subject
If you wish to send it on a non-default socket, use Nats.Effect.onSocket
Publish a new message on a given subject, with a 'replyTo' attribute
Subscribe to a subject
If you wish to subscribe on a non-default socket, use Nats.Sub.onSocket
Subscribe to a subject with a group
If you wish to subscribe on a non-default socket, use Nats.Sub.onSocket
Create a request
The timeout is 5s by default
Create a request with a custom timeout
Create a request with custom features
Track a request
Cancel an active request, given its marker
Add a marker on a request
If the effect is not a request, the function is no-op
The NATS configuration
The nats internal state
A nats internal Msg
Set a custom inbox prefix
A nats effect
Kind of like Cmd, but will be converted at the last moment to regular Cmd
A nats subscription
Will be converted at the last moment to regular Sub.
Update the nats state according to all the Nats.Effect and Nats.Sub gathered by the app root component, and emit all the necessary Cmd
Handle Nats Msg
Connect the nats internal state to the ports
List all the active requests
Open a socket
The socket will be opened as soon as the subscription is active, and until the subscriptions is removed.
The socket may get closed if a network error occurs, in which case a 'SocketError' event will be sent
After the subscription is removed, the handler will receive a SocketClosed event.