Documentation ¶
Index ¶
Constants ¶
View Source
const LastEventID = "Last-Event-ID"
LastEventID header
Variables ¶
View Source
var ErrDurationEmpty = errors.New("duration is empty")
ErrDurationEmpty message
View Source
var ErrMessageEmpty = errors.New("message is empty")
ErrMessageEmpty message
Functions ¶
This section is empty.
Types ¶
type EventMarshaler ¶
EventMarshaler interface
type HandlerFunc ¶
type HandlerFunc func(ResponseWriter, *http.Request)
HandlerFunc type
func (HandlerFunc) ServeHTTP ¶
func (f HandlerFunc) ServeHTTP(w ResponseWriter, r *http.Request)
ServeHTTP calls f(w, r).
type MessageEvent ¶
MessageEvent struct
func (MessageEvent) MarshalEvent ¶
func (m MessageEvent) MarshalEvent() ([]byte, error)
MarshalEvent implements the encoding.TextMarshaler interface.
type ResponseWriter ¶
type ResponseWriter struct { http.ResponseWriter // contains filtered or unexported fields }
ResponseWriter struct
func (*ResponseWriter) Send ¶
func (rw *ResponseWriter) Send(data EventMarshaler)
Send data to client
type Retry ¶
Retry struct
func (Retry) MarshalEvent ¶
MarshalEvent implements the EventMarshaler interface.
Click to show internal directories.
Click to hide internal directories.