Documentation ¶
Index ¶
Constants ¶
View Source
const ( MimeTypeEventStream = "text/event-stream" MimeTypeJson = "application/json" )
Variables ¶
View Source
var SupportedMimeTypes = []string{MimeTypeEventStream, MimeTypeJson}
Functions ¶
func ServeEvents ¶
Types ¶
type Event ¶
type Event struct { ID string `json:"id,omitempty"` Event string `json:"event,omitempty"` Data json.RawMessage `json:"data"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.