code: func (l *State) AddServiceWithChecks(service *structs.NodeService, checks []*structs.HealthCheck, token string) error {
  	l.Lock()
  	defer l.Unlock()
  
  	if err := l.addServiceLocked(service, token); err != nil {
  		return err
  	}
  
  	for _, check := range checks {
  		if err := l.addCheckLocked(check, token); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // AddServiceWithChecks adds a service and its check tp the local state atomically