code: func (i *TeleInstance) Start() error {
  	// Build a list of expected events to wait for before unblocking based off
  	// the configuration passed in.
  	expectedEvents := []string{}
  	if i.Config.Auth.Enabled {
  		expectedEvents = append(expectedEvents, service.AuthTLSReady)
  	}
  	if i.Config.Proxy.Enabled {
  		expectedEvents = append(expectedEvents, service.ProxyReverseTunnelReady)
  		expectedEvents = append(expectedEvents, service.ProxySSHReady)
  		expectedEvents = append(expectedEvents, service.ProxyAgentPoolReady)
  		if !i.Config.Proxy.DisableWebService {
  			expectedEvents = append(expectedEvents, service.ProxyWebServerReady)
  		}
  	}
  	if i.Config.SSH.Enabled {
  		expectedEvents = append(expectedEvents, service.NodeSSHReady)
  	}
  
  	// Start the process and block until the expected events have arrived.
  	receivedEvents, err := startAndWait(i.Process, expectedEvents)
  	if err != nil {
  		return trace.Wrap(err)
  	}
  
  	// Extract and set reversetunnel.Server and reversetunnel.AgentPool upon
  	// receipt of a ProxyReverseTunnelReady and ProxyAgentPoolReady respectively.
  	for _, re := range receivedEvents {
  		switch re.Name {
  		case service.ProxyReverseTunnelReady:
  			ts, ok := re.Payload.(reversetunnel.Server)
  			if ok {
  				i.Tunnel = ts
  			}
  		case service.ProxyAgentPoolReady:
  			ap, ok := re.Payload.(*reversetunnel.AgentPool)
  			if ok {
  				i.Pool = ap
  			}
  		}
  	}
  
  	log.Debugf("Teleport instance %v started: %v/%v events received.",
  		i.Secrets.SiteName, len(receivedEvents), len(expectedEvents))
  	return nil
  }
docs: // Start will start the TeleInstance and then block until it is ready to
  // process requests based off the passed in configuration.