v0.8.0
Pre-release
Pre-release
This version removes all external dependencies of go-sse
. All our bugs are belong to us! It also does some API and documentation cleanups.
Removed
Client.DefautReconnectionTime
,Client.MaxRetries
have been replaced with the newClient.Backoff
configuration field. See the Added section for more info.ErrReplayFailed
is removed from the public API.ReplayProviderWithGC
andJoe.ReplayGCInterval
are no more. The responsibility for garbage collection is assigned to the replay providers.
Changed
Server.Logger
is now of a new type: theLogger
interface. The dependency on x/exp/slog is removed. This opens up the possibility to adapt any existing logger to be usable withServer
.- The default backoff behavior has changed. The previous defaults map to the new
Backoff
configuration as follows:
sse.Backoff{
InitialInterval: 5 * time.Second, // currently 500ms
Multiplier: 1.5, // currently the same
Jitter: 0.5, // currently the same
MaxInterval: 60 * time.Second, // currently unbounded
MaxElapsedDuration: 15 * time.Minute, // currently unbounded
MaxRetries: -1, // previously no retries by default, currently unbounded
}
Joe
now accepts new subscriptions even if replay providers panic (previouslyErrReplayFailed
would be returned).Server.ServeHTTP
panics if a customOnSession
handler returns aSubscription
with 0 topics
Added
- The
Logger
interface,LogLevel
type, andLogLevel(Info|Warn|Error)
values. Backoff
andClient.Backoff
– the backoff strategy is now fully configurable. See the code documentation for info.ValidReplayProvider.GCInterval
, to configure at which interval expired events should be cleaned up.