code: func (kern *Kernel) Shutdown(ctx context.Context) (err error) {
  	kern.shutdownOnce.Do(func() {
  		logger := kern.Logger.WithScope("Shutdown")
  		logger.InfoMsg("Attempting graceful shutdown...")
  		logger.InfoMsg("Shutting down servers")
  		// Shutdown servers in reverse order to boot
  		for i := len(kern.Launchers) - 1; i >= 0; i-- {
  			name := kern.Launchers[i].Name
  			proc, ok := kern.processes[name]
  			if ok {
  				logger.InfoMsg("Shutting down server", "server_name", name)
  				sErr := proc.Shutdown(ctx)
  				if sErr != nil {
  					logger.InfoMsg("Failed to shutdown server",
  						"server_name", name,
  						structure.ErrorKey, sErr)
  					if err == nil {
  						err = sErr
  					}
  				}
  			}
  		}
  		logger.InfoMsg("Shutdown complete")
  		// Best effort
  		structure.Sync(kern.Logger.Info)
  		structure.Sync(kern.Logger.Trace)
  		// We don't want to wait for them, but yielding for a cooldown Let other goroutines flush
  		// potentially interesting final output (e.g. log messages)
  		time.Sleep(CooldownTime)
  		close(kern.shutdownNotify)
  	})
  	return
  }
docs: // Shutdown stops the kernel allowing for a graceful shutdown of components in order