github.com/igoogolx/clash@v1.19.8/adapter/outboundgroup/common.go (about) 1 package outboundgroup 2 3 import ( 4 "time" 5 6 C "github.com/igoogolx/clash/constant" 7 "github.com/igoogolx/clash/constant/provider" 8 ) 9 10 const ( 11 defaultGetProxiesDuration = time.Second * 5 12 ) 13 14 func touchProviders(providers []provider.ProxyProvider) { 15 for _, provider := range providers { 16 provider.Touch() 17 } 18 } 19 20 func getProvidersProxies(providers []provider.ProxyProvider, touch bool) []C.Proxy { 21 proxies := []C.Proxy{} 22 for _, provider := range providers { 23 if touch { 24 provider.Touch() 25 } 26 proxies = append(proxies, provider.Proxies()...) 27 } 28 return proxies 29 }