sse_phx_pubsub v1.0.3 SsePhoenixPubsub.Server

Server for streaming Server-Sent Events to http clients.

Link to this section Summary

Link to this section Types

Link to this type

chunk_conn()

chunk_conn() :: {:ok, conn()} | {:error, term()}
Link to this type

conn()

conn() :: Plug.Conn.t()
Link to this type

pubsub_info()

pubsub_info() :: {atom(), topics()}
Link to this type

topic()

topic() :: String.t()
Link to this type

topics()

topics() :: [topic()]

Link to this section Functions

Link to this function

stream(conn, pubsub_info, chunk)

stream(conn(), pubsub_info(), chunk()) :: conn()

Stream SSE events.

SsePhoenixPubsub.stream(conn, {MyApp.PubSub, ["time"]})