This module is conceptually similar to Platform.Sub
, but allows you to subscribe to Urbit channels.
Internal.Sub msg
Like Sub
from Platform.Sub
but for Urbit subscriptions.
subscribe : { ship : String, app : String, path : List String, deconstructor : Ur.Deconstructor.Deconstructor msg } -> Sub msg
Creates an Urbit subscription.
subscribe
{ ship = ship
, app = "journal"
, path = [ "updates" ]
, deconstructor = decodeJournalUpdate |> D.map GotUpdate
}
none : Sub msg
A subscription that does exactly nothing. (Does not subscribe to anything)
batch : List (Sub msg) -> Sub msg
Batch multiple subscriptions into one.
sink : { ship : String, app : String, path : List String, deconstructor : Ur.Deconstructor.Deconstructor msg } -> Sub msg
Creates a %sink subscription.