code: func (h *Handler) handleGetStatus(w http.ResponseWriter, r *http.Request) {
  	if !validHeaderAcceptJSON(r.Header) {
  		http.Error(w, "JSON only acceptable response", http.StatusNotAcceptable)
  		return
  	}
  	status := getStatusResponse{
  		State:   h.api.State(),
  		Nodes:   h.api.Hosts(r.Context()),
  		LocalID: h.api.Node().ID,
  	}
  	if err := json.NewEncoder(w).Encode(status); err != nil {
  		h.logger.Printf("write status response error: %s", err)
  	}
  }
docs: // handleGetStatus handles GET /status requests.