// SelectSource random select a store that can pass all filters
SelectSource random select a store that can pass all filters
// SelectSource random select a store that can pass all filters
func (s *LabelSelector) SelectSource(opt opt.Options, stores []*core.StoreInfo, filters ...Filter) *core.StoreInfo {
	filters = append(filters, s.filters...)
	for _, store := range stores {
		if Source(opt, store, filters) {
			fmt.Printf("LabelSelector-SelectSource: filter store %d\n", store.GetID())
			continue
		}
		return store
	}
	return nil
}
func ( s * LabelSelector ) SelectSource ( opt opt . Options , stores [ ] * core . StoreInfo , filters ... Filter ) * core . StoreInfo { filters = append ( filters , s . filters ... ) for _ , store := range stores { if Source ( opt , store , filters ) { fmt . Printf ( " \n " , store . GetID ( ) ) continue } return store } return nil }
SelectSource random select a store that can pass all filters
SelectSource random select a store that can pass all filters