code: func (p *Plugin) AfterInit() error {
  	p.access.Lock()
  	defer p.access.Unlock()
  
  	// do periodic status probing for plugins that have provided the probe function
  	go p.periodicProbing(p.ctx)
  
  	// do periodic updates of the state data in ETCD
  	go p.periodicUpdates(p.ctx)
  
  	p.publishAgentData()
  
  	// transition to OK state if there are no plugins
  	if len(p.pluginStat) == 0 {
  		p.agentStat.State = status.OperationalState_OK
  		p.agentStat.LastChange = time.Now().Unix()
  		p.publishAgentData()
  	}
  
  	return nil
  }
docs: // AfterInit starts go routines for periodic probing and periodic updates.
  // Initial state data are published via the injected transport.