Versions in this module Expand all Collapse all v0 v0.1.0 Oct 5, 2023 Changes in this version + const ErrNotFlusher + const ErrNotHijacker + func LastEventID(r *http.Request) string + type BinaryMarshaler interface + MarshalBinary func() ([]byte, error) + type Error string + func (e Error) Error() string + type Stream struct + func UpgradeHTTP(r *http.Request, w http.ResponseWriter) (*Stream, error) + func (s *Stream) Close() error + func (s *Stream) Flush() error + func (s *Stream) SetEvent(event string) error + func (s *Stream) SetID(id int64) error + func (s *Stream) SetRetry(retry time.Duration) error + func (s *Stream) WriteBinary(message BinaryMarshaler) error + func (s *Stream) WriteBytes(data []byte) error + func (s *Stream) WriteEvent(id int64, event string, data []byte) error + func (s *Stream) WriteFloat(num float64) error + func (s *Stream) WriteInt(num int64) error + func (s *Stream) WriteJSON(v interface{}) error + func (s *Stream) WriteString(data string) error + func (s *Stream) WriteText(message TextMarshaler) error + type TextMarshaler interface + MarshalText func() ([]byte, error) + type Upgrader struct + Timeout time.Duration + func (u Upgrader) Upgrade(conn io.ReadWriter) (*Stream, error) + func (u Upgrader) UpgradeHTTP(r *http.Request, w http.ResponseWriter) (*Stream, error)