MCPcopy
hub / github.com/NVIDIA/aistore / getRandomProxyURL

Function getRandomProxyURL

devtools/tutils/node.go:118–121  ·  view source on GitHub ↗
(smap *cluster.Smap)

Source from the content-addressed store, hash-verified

116}
117
118func getRandomProxyURL(smap *cluster.Smap) string {
119 proxies := smap.Pmap.ActiveNodes()
120 return proxies[rand.Intn(len(proxies))].URL(cmn.NetPublic)
121}
122
123// Return the first proxy from smap that is IC member. The primary
124// proxy has higher priority.

Callers 1

RandomProxyURLFunction · 0.85

Calls 2

ActiveNodesMethod · 0.80
URLMethod · 0.45

Tested by

no test coverage detected