orus-io / elm-nats / Nats.Effect

The Nats Effect API

If you are familiar with the core Cmd api, you will feel at home here

none : Nats.Effect datatype msg

Tell nats there are no effect

map : (a -> b) -> Nats.Effect datatype a -> Nats.Effect datatype b

Transform the messages produced by an effect

batch : List (Nats.Effect datatype msg) -> Nats.Effect datatype msg

Batch several nats effect, pretty much like Cmd.batch

onSocket : String -> Nats.Effect datatype msg -> Nats.Effect datatype msg

Set / change the socket on which the effect should apply

setRequestMarker : String -> Nats.Effect datatype msg -> Nats.Effect datatype msg

if the effect is a single request, set its marker to the given one