code: func (p *Plugin) livenessProbeHandler(formatter *render.Render) http.HandlerFunc {
  	return func(w http.ResponseWriter, req *http.Request) {
  		stat := p.getAgentStatus()
  		statJSON, _ := json.Marshal(stat)
  
  		if stat.State == status.OperationalState_INIT || stat.State == status.OperationalState_OK {
  			w.WriteHeader(http.StatusOK)
  			w.Write(statJSON)
  		} else {
  			w.WriteHeader(http.StatusInternalServerError)
  			w.Write(statJSON)
  		}
  	}
  }
docs: // livenessProbeHandler handles k8s liveness probe.