buckaroo v0.3.0 Buckaroo.EventSource behaviour View Source
A simple SSE implementation.
Link to this section Summary
Link to this section Types
Link to this type
event()
View Sourceevent() :: %{ :data => binary(), optional(:id) => binary(), optional(:type) => binary(), optional(:retry) => pos_integer() } | binary()
SSE event.
SSE callback result.
Link to this section Callbacks
Incoming process messages.
Link to this callback
init(conn, state)
View Sourceinit(conn :: Plug.Conn.t(), state :: state) :: result(state) when state: any()
Initialize the SSE.
Passes the connection and the given state.
SSE termination.