ConfigFunc is a function used to initialize a new server.
WithBufferSize sets the internal buffer for each connected client. This buffer counts distinct events. The default is 100.
Server is an http.Handler that will fanout Server-Sent Events to all connected clients.
NewServer creates a new server with the given event channel. The server returned by this function has not yet started.
Handler converts an HTTP request into a streaming response. This can be used with libraries that utilize efritz/response. Alternatively, the ServeHTTP member on the Server struct is a http.HandlerFunc that can be served directly.
Start will begin serializing events that come in on the event channel and sending the payload to each registered client. This method will block until the event channel has closed.