code: func (rt *apiRoundTripper) DoWithProgress(ctx context.Context, r *http.Request, v interface{}, reqID string, progress ProgressFunc) (*http.Response, error) {
  	done := make(chan bool)
  	req, _, err := rt.newRequest("GET", daemonAPIVersion, "/observe", nil, nil)
  	if err != nil {
  		return nil, err
  	}
  	stream, err := eventsource.SubscribeWith("", rt.Client, req)
  	if err != nil {
  		return nil, err
  	}
  
  	go func() {
  		for {
  			select {
  			case <-done:
  				return
  			case ev := <-stream.Events:
  				data := ev.Data()
  				raw := []byte(data)
  
  				event := Event{}
  				event.MessageType = "message"
  				err = json.Unmarshal(raw, &event)
  				if err != nil {
  					progress(nil, err)
  					go func() {
  						<-done
  					}()
  					return
  				}
  				if event.ID == reqID {
  					progress(&event, nil)
  				}
  			case err := <-stream.Errors:
  				progress(nil, err)
  			}
  		}
  	}()
  
  	defer func() { done <- true }()
  
  	return rt.Do(ctx, r, v)
  }
docs: // DoWithProgress executes the HTTP request like Do, in addition to
  // connecting the provided ProgressFunc to any server-sent event progress
  // messages.