Versions in this module Expand all Collapse all v0 v0.1.0 Jan 28, 2021 Changes in this version + var ErrRateLimited = errors.New("Rate limit exceeded") + func WriteEvent(ctx context.Context, w http.ResponseWriter, e Event) + func WritePreamble(ctx context.Context, w http.ResponseWriter) bool + type Event struct + Data interface{} + Error error + Event string + ID string + Retry int + type GenerateEventsFunc func() ([]Event, error) + type LedgerSourceFactory interface + Get func() ledger.Source + type Stream struct + func NewStream(ctx context.Context, w http.ResponseWriter) *Stream + func (s *Stream) Done() + func (s *Stream) Err(err error) + func (s *Stream) Init() + func (s *Stream) Send(e Event) + func (s *Stream) SetLimit(limit int) + type StreamHandler struct + LedgerSourceFactory LedgerSourceFactory + RateLimiter *throttled.HTTPRateLimiter + func (handler StreamHandler) ServeStream(w http.ResponseWriter, r *http.Request, limit int, ...)