code: func (p *Plugin) periodicUpdates(ctx context.Context) {
  	p.wg.Add(1)
  	defer p.wg.Done()
  
  	for {
  		select {
  		case <-time.After(PeriodicWriteTimeout):
  			p.publishAllData()
  
  		case <-ctx.Done():
  			return
  		}
  	}
  }
docs: // periodicUpdates does periodic writes of state data into ETCD.