hunter v0.5.1 Hunter.EventStream View Source

Event stream is a simple stream of text data encoded using UTF-8

Messages in the event stream are separated by a pair of newline characters. A colon as the first character of a line is in essence a comment, and is ignored.

Fields

  • id - event id
  • event - the event's type
  • data - data field for the message, this data is JSON-encoded
  • retry - re-connection time to use when attempting to send the event.

See: Using server-sent events

Link to this section Summary

Link to this section Types

Link to this type

t() View Source
t() :: %Hunter.EventStream{
  data: String.t(),
  event: String.t(),
  id: String.t(),
  retry: non_neg_integer()
}