Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶ added in v0.1.5
type Event struct { ID string // id (optional) Type string // event type (optional) Data []byte // data Retry int // retry (optional) }
https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation
type Server ¶
type Server struct { Now func() time.Time // Used for testing // contains filtered or unexported fields }
type Stream ¶ added in v0.1.5
type Stream struct {
// contains filtered or unexported fields
}
func Dial ¶ added in v0.1.5
Dial creates a server-sent event (SSE) stream. This stream has been adapted from the following minimal eventsource stream: - https://github.com/neelance/eventsource/blob/master/client/client.go Thanks Richard!
Click to show internal directories.
Click to hide internal directories.