code: func (s *Server) listenersFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot, token string) ([]proto.Message, error) {
  	if cfgSnap == nil {
  		return nil, errors.New("nil config given")
  	}
  
  	// One listener for each upstream plus the public one
  	resources := make([]proto.Message, len(cfgSnap.Proxy.Upstreams)+1)
  
  	// Configure public listener
  	var err error
  	resources[0], err = s.makePublicListener(cfgSnap, token)
  	if err != nil {
  		return nil, err
  	}
  	for i, u := range cfgSnap.Proxy.Upstreams {
  		resources[i+1], err = s.makeUpstreamListener(&u)
  		if err != nil {
  			return nil, err
  		}
  	}
  	return resources, nil
  }
docs: // listenersFromSnapshot returns the xDS API representation of the "listeners"
  // in the snapshot.