Versions in this module Expand all Collapse all v1 v1.0.0 Jul 4, 2019 Changes in this version + var ErrSourceClosed = errors.New("source closed") + type BadResponseError struct + Response *http.Response + func (err BadResponseError) Error() string + type Config struct + Client *http.Client + RequestCreator func() *http.Request + RetryParams RetryParams + func (c *Config) Connect() (*EventSource, error) + type Event struct + Data []byte + ID string + Name string + Retry time.Duration + func (event Event) Encode() string + func (event Event) Write(destination io.Writer) error + type EventSource struct + func Connect(client *http.Client, defaultRetryInterval time.Duration, ...) (*EventSource, error) + func NewEventSource(client *http.Client, defaultRetryInterval time.Duration, ...) *EventSource + func (source *EventSource) Close() error + func (source *EventSource) Next() (Event, error) + type ReadCloser struct + func NewReadCloser(source io.ReadCloser) *ReadCloser + func (rc *ReadCloser) Close() error + func (rc *ReadCloser) Next() (Event, error) + type RetryParams struct + MaxRetries uint16 + RetryInterval time.Duration