code: func (s *Streamer) ServeHTTP(w http.ResponseWriter, _ *http.Request) {
  	// We need to be able to flush for SSE
  	fl, ok := w.(http.Flusher)
  	if !ok {
  		http.Error(w, "Flushing not supported", http.StatusNotImplemented)
  		return
  	}
  
  	// Returns a channel that blocks until the connection is closed
  	cn, ok := w.(http.CloseNotifier)
  	if !ok {
  		http.Error(w, "Closing not supported", http.StatusNotImplemented)
  		return
  	}
  	close := cn.CloseNotify()
  
  	// Set headers for SSE
  	h := w.Header()
  	h.Set("Cache-Control", "no-cache")
  	h.Set("Connection", "keep-alive")
  	h.Set("Content-Type", "text/event-stream")
  
  	// Connect new client
  	cl := make(client, s.bufSize)
  	s.connecting <- cl
  
  	for {
  		select {
  		case <-close:
  			// Disconnect the client when the connection is closed
  			s.disconnecting <- cl
  			return
  
  		case event := <-cl:
  			// Write events
  			w.Write(event) // TODO: error handling
  			fl.Flush()
  		}
  	}
  }
docs: // ServeHTTP implements http.Handler interface.