code: func endpointsFromSnapshot(cfgSnap *proxycfg.ConfigSnapshot, token string) ([]proto.Message, error) {
  	if cfgSnap == nil {
  		return nil, errors.New("nil config given")
  	}
  	resources := make([]proto.Message, 0, len(cfgSnap.UpstreamEndpoints))
  	for id, endpoints := range cfgSnap.UpstreamEndpoints {
  		la := makeLoadAssignment(id, endpoints)
  		resources = append(resources, la)
  	}
  	return resources, nil
  }
docs: // endpointsFromSnapshot returns the xDS API representation of the "endpoints"
  // (upstream instances) in the snapshot.