Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BadContentType ¶
type BadContentType struct {
ContentType string
}
func (*BadContentType) Error ¶
func (err *BadContentType) Error() string
type BadStatusCode ¶
type BadStatusCode struct {
StatusCode int
}
func (*BadStatusCode) Error ¶
func (err *BadStatusCode) Error() string
type EndListener ¶
type EndListener func()
type ErrListener ¶
type ErrListener func(err error)
type EventSource ¶
type EventSource struct {
// contains filtered or unexported fields
}
func NewEventSource ¶
func NewEventSource(c *http.Client, urlStr string) *EventSource
func (*EventSource) AddHeader ¶
func (s *EventSource) AddHeader(name, value string)
func (*EventSource) Close ¶
func (s *EventSource) Close()
func (*EventSource) On ¶
func (s *EventSource) On(event string, listener Listener)
func (*EventSource) OnEnd ¶
func (s *EventSource) OnEnd(listener EndListener)
EndListener is called when the EventSource is closed and there will be no more events fired from it
func (*EventSource) OnError ¶
func (s *EventSource) OnError(listener ErrListener)
func (*EventSource) Open ¶
func (s *EventSource) Open()
Click to show internal directories.
Click to hide internal directories.