code: func (o *Observer) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
  
  	rwf := rw.(http.Flusher)
  	closed := rw.(http.CloseNotifier).CloseNotify()
  
  	notify := make(chan []byte)
  	o.newObservers <- notify
  
  	defer func() {
  		o.closedObservers <- notify
  	}()
  
  	rw.Header().Set("Content-Type", "text/event-stream")
  	rw.Header().Set("Connection", "keep-alive")
  	rwf.Flush()
  
  	for {
  		select {
  		case evt := <-notify:
  			// Write the event to the client. we ignore errors here, and
  			// let the close channel tell us when to stop writing.
  			rw.Write(evt)
  			rwf.Flush()
  
  		case <-closed: // client has disconnected. Exit.
  			return
  		case <-o.closed: // The Observer is shutting down. Exit.
  			return
  		}
  	}
  }
docs: // ServeHTTP implements the http.Handler interface for providing server-sent
  // events of observed notifications.