Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDone = errors.New("stream: done")
ErrDone signals that the consumer has finished processing the stream.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
HTTPClient *http.Client
MaxRetries int // -1 for unlimited retries
IdleTimeout time.Duration // optional: cancel stream if no events for this duration
Logger *slog.Logger // optional: logger for backoff and reconnect events
}
Client streams server-sent events with reconnection semantics.
Click to show internal directories.
Click to hide internal directories.