Weatherflow Tempest v0.1.0 WeatherflowTempest.PubSub
Convenience for interacting with Phoenix.Pubsub
Interacts with the PubSub named in config:
config :weatherflow_tempest, :pubsub_name, MyApp.PubSub
or via one named :weatherflow_tempest if that is not defined.
Events are published as %Phoenix.Pubsub.broadcast{} structs with the “event” field being the event type from the Weatherflow API, and the parsed object as the payload. UDP events received over the network are emitted over the “weatherflow:udp” topic.
Link to this section Summary
Functions
Return the name of the pubsub we’re using
Subscribe to the correct pubsub name and channel to receive all UDP events as %Phoenix.PubSub.broadcast{} structs
Link to this section Functions
Link to this function
get_pubsub_name()
Return the name of the pubsub we’re using
Link to this function
subscribe_udp_events()
Subscribe to the correct pubsub name and channel to receive all UDP events as %Phoenix.PubSub.broadcast{} structs