code: func (p *Plugin) readinessProbeHandler(formatter *render.Render) http.HandlerFunc {
  	return func(w http.ResponseWriter, req *http.Request) {
  		ifStat := p.StatusCheck.GetInterfaceStats()
  		agentStat := p.getAgentStatus()
  		agentStat.InterfaceStats = &ifStat
  		agentStatJSON, _ := json.Marshal(agentStat)
  		if agentStat.State == status.OperationalState_OK {
  			w.WriteHeader(http.StatusOK)
  		} else {
  			w.WriteHeader(http.StatusInternalServerError)
  		}
  		w.Write(agentStatJSON)
  	}
  }
docs: // readinessProbeHandler handles k8s readiness probe.