code: func (m *Manager) Run() error {
  	m.mu.Lock()
  	alreadyStarted := m.started
  	m.started = true
  	stateCh := m.stateCh
  	m.mu.Unlock()
  
  	// Protect against multiple Run calls.
  	if alreadyStarted {
  		return ErrStarted
  	}
  
  	// Protect against being run after Close.
  	if stateCh == nil {
  		return ErrStopped
  	}
  
  	// Register for notifications about state changes
  	m.State.Notify(stateCh)
  	defer m.State.StopNotify(stateCh)
  
  	for {
  		m.syncState()
  
  		// Wait for a state change
  		_, ok := <-stateCh
  		if !ok {
  			// Stopped
  			return nil
  		}
  	}
  }
docs: // Run is the long-running method that handles state syncing. It should be run
  // in it's own goroutine and will continue until a fatal error is hit or Close
  // is called. Run will return an error if it is called more than once, or called
  // after Close.