code: func (a *Agent) AddCheck(check *structs.HealthCheck, chkType *structs.CheckType, persist bool, token string, source configSource) error {
  	a.stateLock.Lock()
  	defer a.stateLock.Unlock()
  	return a.addCheckLocked(check, chkType, persist, token, source)
  }
docs: // AddCheck is used to add a health check to the agent.
  // This entry is persistent and the agent will make a best effort to
  // ensure it is registered. The Check may include a CheckType which
  // is used to automatically update the check status