code: func (p *PMExample) runWatcher(state *status.ProcessStatus, notifyChan chan status.ProcessStatus) {
  	for {
  		select {
  		case currentState, ok := <-notifyChan:
  			if !ok {
  				p.Log.Infof("===>(watcher) process watcher ended")
  				return
  			}
  			*state = currentState
  			p.Log.Infof("===>(watcher) received test process state: %s", currentState)
  		}
  	}
  }
docs: // Starts the process watcher using provided chanel.